VirtualBox

Changeset 11147

Show
Ignore:
Timestamp:
08/06/08 00:04:24 (4 months ago)
Author:
vboxsync
Message:

PDMQueueGCPtr -> PDMQueueRCPtr; strip duplicate comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/VBox/pdmqueue.h

    r11146 r11147  
    109109typedef FNPDMQUEUEEXT *PFNPDMQUEUEEXT; 
    110110 
    111 /** 
    112  * Create a queue with a device owner. 
    113  * 
    114  * @returns VBox status code. 
    115  * @param   pVM                 VM handle. 
    116  * @param   pDevIns             Device instance. 
    117  * @param   cbItem              Size a queue item. 
    118  * @param   cItems              Number of items in the queue. 
    119  * @param   cMilliesInterval    Number of milliseconds between polling the queue. 
    120  *                              If 0 then the emulation thread will be notified whenever an item arrives. 
    121  * @param   pfnCallback         The consumer function. 
    122  * @param   fGCEnabled          Set if the queue must be usable from GC. 
    123  * @param   ppQueue             Where to store the queue handle on success. 
    124  * @thread  Emulation thread only. 
    125  */ 
    126 PDMR3DECL(int) PDMR3QueueCreateDevice(PVM pVM, PPDMDEVINS pDevIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
    127                                       PFNPDMQUEUEDEV pfnCallback, bool fGCEnabled, PPDMQUEUE *ppQueue); 
    128  
    129 /** 
    130  * Create a queue with a driver owner. 
    131  * 
    132  * @returns VBox status code. 
    133  * @param   pVM                 VM handle. 
    134  * @param   pDrvIns             Driver instance. 
    135  * @param   cbItem              Size a queue item. 
    136  * @param   cItems              Number of items in the queue. 
    137  * @param   cMilliesInterval    Number of milliseconds between polling the queue. 
    138  *                              If 0 then the emulation thread will be notified whenever an item arrives. 
    139  * @param   pfnCallback         The consumer function. 
    140  * @param   ppQueue             Where to store the queue handle on success. 
    141  * @thread  The emulation thread. 
    142  */ 
    143 PDMR3DECL(int) PDMR3QueueCreateDriver(PVM pVM, PPDMDRVINS pDrvIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
    144                                       PFNPDMQUEUEDRV pfnCallback, PPDMQUEUE *ppQueue); 
    145  
    146 /** 
    147  * Create a queue with an internal owner. 
    148  * 
    149  * @returns VBox status code. 
    150  * @param   pVM                 VM handle. 
    151  * @param   cbItem              Size a queue item. 
    152  * @param   cItems              Number of items in the queue. 
    153  * @param   cMilliesInterval    Number of milliseconds between polling the queue. 
    154  *                              If 0 then the emulation thread will be notified whenever an item arrives. 
    155  * @param   pfnCallback         The consumer function. 
    156  * @param   fGCEnabled          Set if the queue must be usable from GC. 
    157  * @param   ppQueue             Where to store the queue handle on success. 
    158  * @thread  Emulation thread only. 
    159  */ 
    160 PDMR3DECL(int) PDMR3QueueCreateInternal(PVM pVM, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
    161                                         PFNPDMQUEUEINT pfnCallback, bool fGCEnabled, PPDMQUEUE *ppQueue); 
    162  
    163 /** 
    164  * Create a queue with an external owner. 
    165  * 
    166  * @returns VBox status code. 
    167  * @param   pVM                 VM handle. 
    168  * @param   cbItem              Size a queue item. 
    169  * @param   cItems              Number of items in the queue. 
    170  * @param   cMilliesInterval    Number of milliseconds between polling the queue. 
    171  *                              If 0 then the emulation thread will be notified whenever an item arrives. 
    172  * @param   pfnCallback         The consumer function. 
    173  * @param   pvUser              The user argument to the consumer function. 
    174  * @param   ppQueue             Where to store the queue handle on success. 
    175  * @thread  The emulation thread. 
    176  */ 
    177 PDMR3DECL(int) PDMR3QueueCreateExternal(PVM pVM, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
    178                                         PFNPDMQUEUEEXT pfnCallback, void *pvUser, PPDMQUEUE *ppQueue); 
    179  
    180 /** 
    181  * Destroy a queue. 
    182  * 
    183  * @returns VBox status code. 
    184  * @param   pQueue      Queue to destroy. 
    185  * @thread  The emulation thread. 
    186  */ 
    187 PDMR3DECL(int) PDMR3QueueDestroy(PPDMQUEUE pQueue); 
    188  
    189 /** 
    190  * Destroy a all queues owned by the specified device. 
    191  * 
    192  * @returns VBox status code. 
    193  * @param   pVM         VM handle. 
    194  * @param   pDevIns     Device instance. 
    195  * @thread  Emulation thread only. 
    196  */ 
    197 PDMR3DECL(int) PDMR3QueueDestroyDevice(PVM pVM, PPDMDEVINS pDevIns); 
    198  
    199 /** 
    200  * Destroy a all queues owned by the specified driver. 
    201  * 
    202  * @returns VBox status code. 
    203  * @param   pVM         VM handle. 
    204  * @param   pDrvIns     Driver instance. 
    205  * @thread  Emulation thread only. 
    206  */ 
    207 PDMR3DECL(int) PDMR3QueueDestroyDriver(PVM pVM, PPDMDRVINS pDrvIns); 
    208  
    209 /** 
    210  * Flushes pending queues. 
    211  * This is a forced action callback. 
    212  * 
    213  * @param   pVM     VM handle. 
    214  * @thread  The emulation thread. 
    215  */ 
     111PDMR3DECL(int)  PDMR3QueueCreateDevice(PVM pVM, PPDMDEVINS pDevIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
     112                                       PFNPDMQUEUEDEV pfnCallback, bool fGCEnabled, PPDMQUEUE *ppQueue); 
     113PDMR3DECL(int)  PDMR3QueueCreateDriver(PVM pVM, PPDMDRVINS pDrvIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
     114                                       PFNPDMQUEUEDRV pfnCallback, PPDMQUEUE *ppQueue); 
     115PDMR3DECL(int)  PDMR3QueueCreateInternal(PVM pVM, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
     116                                         PFNPDMQUEUEINT pfnCallback, bool fGCEnabled, PPDMQUEUE *ppQueue); 
     117PDMR3DECL(int)  PDMR3QueueCreateExternal(PVM pVM, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, 
     118                                         PFNPDMQUEUEEXT pfnCallback, void *pvUser, PPDMQUEUE *ppQueue); 
     119PDMR3DECL(int)  PDMR3QueueDestroy(PPDMQUEUE pQueue); 
     120PDMR3DECL(int)  PDMR3QueueDestroyDevice(PVM pVM, PPDMDEVINS pDevIns); 
     121PDMR3DECL(int)  PDMR3QueueDestroyDriver(PVM pVM, PPDMDRVINS pDrvIns); 
    216122PDMR3DECL(void) PDMR3QueueFlushAll(PVM pVM); 
    217  
    218 /** 
    219  * This is a worker function used by PDMQueueFlush to perform the 
    220  * flush in ring-3. 
    221  * 
    222  * The queue which should be flushed is pointed to by either pQueueFlushGC, 
    223  * pQueueFlushHC, or pQueueue. This function will flush that queue and 
    224  * recalc the queue FF. 
    225  * 
    226  * @param   pVM     The VM handle. 
    227  * @param   pQueue  The queue to flush. Only used in Ring-3. 
    228  */ 
    229123PDMR3DECL(void) PDMR3QueueFlushWorker(PVM pVM, PPDMQUEUE pQueue); 
    230124 
    231 /** 
    232  * Flushes a PDM queue. 
    233  * 
    234  * @param   pQueue          The queue handle. 
    235  */ 
    236 PDMDECL(void) PDMQueueFlush(PPDMQUEUE pQueue); 
    237  
    238 /** 
    239  * Allocate an item from a queue. 
    240  * The allocated item must be handed on to PDMQueueInsert() after the 
    241  * data has been filled in. 
    242  * 
    243  * @returns Pointer to allocated queue item. 
    244  * @returns NULL on failure. The queue is exhausted. 
    245  * @param   pQueue      The queue handle. 
    246  * @thread  Any thread. 
    247  */ 
    248 PDMDECL(PPDMQUEUEITEMCORE) PDMQueueAlloc(PPDMQUEUE pQueue); 
    249  
    250 /** 
    251  * Queue an item. 
    252  * The item must have been obtained using PDMQueueAlloc(). Once the item 
    253  * has been passed to this function it must not be touched! 
    254  * 
    255  * @param   pQueue      The queue handle. 
    256  * @param   pItem       The item to insert. 
    257  * @thread  Any thread. 
    258  */ 
    259 PDMDECL(void) PDMQueueInsert(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem); 
    260  
    261 /** 
    262  * Queue an item. 
    263  * The item must have been obtained using PDMQueueAlloc(). Once the item 
    264  * have been passed to this function it must not be touched! 
    265  * 
    266  * @param   pQueue          The queue handle. 
    267  * @param   pItem           The item to insert. 
    268  * @param   NanoMaxDelay    The maximum delay before processing the queue, in nanoseconds. 
    269  *                          This applies only to GC. 
    270  * @thread  Any thread. 
    271  */ 
    272 PDMDECL(void) PDMQueueInsertEx(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem, uint64_t NanoMaxDelay); 
    273  
    274  
    275 /** 
    276  * Gets the GC pointer for the specified queue. 
    277  * 
    278  * @returns The GC address of the queue. 
    279  * @returns NULL if pQueue is invalid. 
    280  * @param   pQueue          The queue handle. 
    281  */ 
    282 PDMDECL(RCPTRTYPE(PPDMQUEUE)) PDMQueueGCPtr(PPDMQUEUE pQueue); 
     125PDMDECL(void)                 PDMQueueFlush(PPDMQUEUE pQueue); 
     126PDMDECL(PPDMQUEUEITEMCORE)    PDMQueueAlloc(PPDMQUEUE pQueue); 
     127PDMDECL(void)                 PDMQueueInsert(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem); 
     128PDMDECL(void)                 PDMQueueInsertEx(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem, uint64_t NanoMaxDelay); 
     129PDMDECL(RCPTRTYPE(PPDMQUEUE)) PDMQueueRCPtr(PPDMQUEUE pQueue); 
     130/** @todo eliminate PDMQueueGCPtr */ 
     131#define PDMQueueGCPtr(pQueue) PDMQueueRCPtr(pQueue) 
    283132PDMDECL(R0PTRTYPE(PPDMQUEUE)) PDMQueueR0Ptr(PPDMQUEUE pQueue); 
    284133 
  • trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp

    r11146 r11147  
    131131 
    132132/** 
    133  * Gets the GC pointer for the specified queue. 
     133 * Gets the RC pointer for the specified queue. 
    134134 * 
    135  * @returns The GC address of the queue. 
     135 * @returns The RC address of the queue. 
    136136 * @returns NULL if pQueue is invalid. 
    137137 * @param   pQueue          The queue handle. 
    138138 */ 
    139 PDMDECL(RCPTRTYPE(PPDMQUEUE)) PDMQueueGCPtr(PPDMQUEUE pQueue) 
     139PDMDECL(RCPTRTYPE(PPDMQUEUE)) PDMQueueRCPtr(PPDMQUEUE pQueue) 
    140140{ 
    141141    Assert(VALID_PTR(pQueue)); 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy