VirtualBox

Changeset 8399 in vbox for trunk/include


Ignore:
Timestamp:
Apr 25, 2008 7:03:40 PM (17 years ago)
Author:
vboxsync
Message:

r=bird: We don't use 'rg' and 'cn' prefixes, we use the briefer 'a' and 'c'. Arrays and counts are plural. Fixed some of the docs. Don't use typedef struct BLAH *PBLAH; unless its required, just follow the normal order where you define the struct and its typedef first! Btw. consider using const pointers for the scatter / gather arrays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmifs.h

    r8374 r8399  
    10271027
    10281028
    1029 /** Pointer to an iSCSI Request PDU buffer. */
    1030 typedef struct ISCSIREQ *PISCSIREQ;
    10311029/**
    10321030 * iSCSI Request PDU buffer (gather).
     
    10391037    const void *pcvSeg;
    10401038} ISCSIREQ;
    1041 
    1042 /** Pointer to an iSCSI Response PDU buffer. */
    1043 typedef struct ISCSIRES *PISCSIRES;
     1039/** Pointer to an iSCSI Request PDU buffer. */
     1040typedef ISCSIREQ *PISCSIREQ;
     1041/** Pointer to a const iSCSI Request PDU buffer. */
     1042typedef ISCSIREQ const *PCISCSIREQ;
     1043
     1044
    10441045/**
    10451046 * iSCSI Response PDU buffer (scatter).
     
    10521053    void *pvSeg;
    10531054} ISCSIRES;
     1055/** Pointer to an iSCSI Response PDU buffer. */
     1056typedef ISCSIRES *PISCSIRES;
     1057/** Pointer to a const iSCSI Response PDU buffer. */
     1058typedef ISCSIRES const *PCISCSIRES;
     1059
    10541060
    10551061/** Pointer to an iSCSI transport driver interface. */
     
    10671073     * @returns VBox status code.
    10681074     * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1069      * @param   pvBuf           Where to store the read bits.
    1070      * @param   cbBuf           Number of bytes to read.
    1071      * @param   pcbRead         Actual number of bytes read.
     1075     * @param   paResponses     Array of scatter segments.
     1076     * @param   cResponses      The number of segments.
    10721077     * @thread  Any thread.
    10731078     * @todo    Correct the docs.
    10741079     */
    1075     DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMIISCSITRANSPORT pTransport, PISCSIRES prgResponse, unsigned int cnResponse));
     1080    DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMIISCSITRANSPORT pTransport, PISCSIRES paResponses, unsigned cResponses));
    10761081
    10771082    /**
     
    10821087     * @returns VBox status code.
    10831088     * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1084      * @param   pvBuf           Where the write bits are stored.
    1085      * @param   cbWrite         Number of bytes to write.
     1089     * @param   paRequests      Array of gather segments.
     1090     * @param   cRequests       The number of segments.
    10861091     * @thread  Any thread.
    10871092     * @todo    Correct the docs.
    10881093     */
    1089     DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMIISCSITRANSPORT pTransport, PISCSIREQ prgRequest, unsigned int cnRequest));
     1094    DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMIISCSITRANSPORT pTransport, PISCSIREQ paRequests, unsigned cRequests));
    10901095
    10911096    /**
     
    11081113    DECLR3CALLBACKMEMBER(int, pfnClose,(PPDMIISCSITRANSPORT pTransport));
    11091114} PDMIISCSITRANSPORT;
     1115
    11101116
    11111117/**
     
    11191125    void   *pvSeg;
    11201126} PDMIDATATRANSPORTSEG;
    1121 
    11221127/** Pointer to a data transport segment. */
    11231128typedef PDMIDATATRANSPORTSEG *PPDMIDATATRANSPORTSEG;
     1129/** Pointer to a const data transport segment. */
     1130typedef PDMIDATATRANSPORTSEG const *PCPDMIDATATRANSPORTSEG;
     1131
    11241132
    11251133/** Pointer to an asynchronous iSCSI transport driver interface. */
     
    11351143     * @returns VBox status code.
    11361144     * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1137      * @param   prgResponse     Pointer to the first scatter list entry.
    1138      * @param   cnResponse      Number of scatter list entries.
     1145     * @param   paResponses     Pointer to a array of scatter segments.
     1146     * @param   cResponses      Number of segments in the array.
    11391147     * @param   pvUser          User argument which is returned in completion callback.
    11401148     * @thread  EMT thread.
    11411149     */
    1142     DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIRES prgResponse, unsigned int cnResponse, void *pvUser));
     1150    DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIRES paResponses, unsigned cResponses, void *pvUser));
    11431151
    11441152    /**
     
    11471155     * @returns VBox status code.
    11481156     * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1149      * @param   prgRequest      Pointer to the fist gather list entry.
    1150      * @param   cnRequest       Number of gather list entries.
     1157     * @param   paRequests      Pointer to a array of gather segments.
     1158     * @param   cRequests       Number of segments in the array.
    11511159     * @param   pvUser          User argument which is returned in completion callback.
    11521160     * @thread  EMT thread.
    11531161     */
    1154     DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIREQ prgRequest, unsigned int cnRequest, void *pvUser));
     1162    DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIREQ pRequests, unsigned cRequests, void *pvUser));
    11551163} PDMIISCSITRANSPORTASYNC;
     1164
    11561165
    11571166/** Pointer to a asynchronous iSCSI transport notify interface. */
     
    11681177     * @returns VBox status code.
    11691178     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1170      * @param   prgResponse     Pointer to the first scatter list entry.
    1171      * @param   cnResponse      Number of scatter list entries.
     1179     * @param   paResponses     Pointer to a array of scatter segments.
     1180     * @param   cResponses      Number of segments in the array.
    11721181     * @param   pvUser          The user argument given in pfnStartRead.
    11731182     * @thread  Any thread.
    11741183     */
    1175     DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pInterface, PISCSIRES prgResponse, unsigned int cnResponse, void *pvUser));
     1184    DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pInterface, PISCSIRES paResponses, unsigned cResponse, void *pvUser));
    11761185
    11771186    /**
     
    11801189     * @returns VBox status code.
    11811190     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1182      * @param   prgRequest      Pointer to the fist gather list entry.
    1183      * @param   cnRequest       Number of gather list entries.
     1191     * @param   paRequests      Pointer to a array of gather segments.
     1192     * @param   cRequests       Number of segments in the array.
    11841193     * @param   pvUser          The user argument given in pfnStartWrite.
    11851194     * @thread  Any thread.
    11861195     */
    1187     DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pTransport, PISCSIREQ prgRequest, unsigned int cnRequest, void *pvUser));
     1196    DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pTransport, PISCSIREQ paRequests, unsigned cRequests, void *pvUser));
    11881197} PDMIISCSITRANSPORTASYNCPORT;
     1198
    11891199
    11901200/** Pointer to a asynchronous block notify interface. */
     
    13621372     * @thread  Any thread.
    13631373     */
    1364     DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 
     1374    DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg,
    13651375                                                      size_t cbRead, void *pvUser));
    13661376
     
    13771387     * @thread  Any thread.
    13781388     */
    1379     DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 
     1389    DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg,
    13801390                                                       size_t cbWritten, void *pvUser));
    13811391} PDMITRANSPORTASYNCPORT;
     
    14451455     * @thread  Any thread.
    14461456     */
    1447     DECLR3CALLBACKMEMBER(int, pfnWriteStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 
     1457    DECLR3CALLBACKMEMBER(int, pfnWriteStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg,
    14481458                                                         size_t cbWrite, void *pvUser));
    14491459
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette