VirtualBox

Changeset 12986 in vbox for trunk/include


Ignore:
Timestamp:
Oct 4, 2008 11:41:17 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37419
Message:

More PDM cleanup.

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r12476 r12986  
    921921typedef DECLCALLBACK(int) FNPDMVBOXDRIVERSREGISTER(PCPDMDRVREGCB pCallbacks, uint32_t u32Version);
    922922
    923 /**
    924  * Register external drivers
    925  *
    926  * @returns VBox status code.
    927  * @param   pVM         The VM to operate on.
    928  * @param   pfnCallback Driver registration callback
    929  */
    930923PDMR3DECL(int) PDMR3RegisterDrivers(PVM pVM, FNPDMVBOXDRIVERSREGISTER pfnCallback);
    931924
  • trunk/include/VBox/pdmthread.h

    r12324 r12986  
    284284
    285285#ifdef IN_RING3
    286 /**
    287  * Creates a PDM thread for internal use in the VM.
    288  *
    289  * @returns VBox status code.
    290  * @param   pVM         The VM handle.
    291  * @param   ppThread    Where to store the thread 'handle'.
    292  * @param   pvUser      The user argument to the thread function.
    293  * @param   pfnThread   The thread function.
    294  * @param   pfnWakeUp   The wakup callback. This is called on the EMT thread when
    295  *                      a state change is pending.
    296  * @param   cbStack     See RTThreadCreate.
    297  * @param   enmType     See RTThreadCreate.
    298  * @param   pszName     See RTThreadCreate.
    299  */
    300286PDMR3DECL(int) PDMR3ThreadCreate(PVM pVM, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADINT pfnThread,
    301287                                 PFNPDMTHREADWAKEUPINT pfnWakeUp, size_t cbStack, RTTHREADTYPE enmType, const char *pszName);
    302 
    303 /**
    304  * Creates a PDM thread for VM use by some external party.
    305  *
    306  * @returns VBox status code.
    307  * @param   pVM         The VM handle.
    308  * @param   ppThread    Where to store the thread 'handle'.
    309  * @param   pvUser      The user argument to the thread function.
    310  * @param   pfnThread   The thread function.
    311  * @param   pfnWakeUp   The wakup callback. This is called on the EMT thread when
    312  *                      a state change is pending.
    313  * @param   cbStack     See RTThreadCreate.
    314  * @param   enmType     See RTThreadCreate.
    315  * @param   pszName     See RTThreadCreate.
    316  */
    317288PDMR3DECL(int) PDMR3ThreadCreateExternal(PVM pVM, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADEXT pfnThread,
    318289                                         PFNPDMTHREADWAKEUPEXT pfnWakeUp, size_t cbStack, RTTHREADTYPE enmType, const char *pszName);
    319 
    320 /**
    321  * Destroys a PDM thread.
    322  *
    323  * This will wakeup the thread, tell it to terminate, and wait for it terminate.
    324  *
    325  * @returns VBox status code.
    326  *          This reflects the success off destroying the thread and not the exit code
    327  *          of the thread as this is stored in *pRcThread.
    328  * @param   pThread         The thread to destroy.
    329  * @param   pRcThread       Where to store the thread exit code. Optional.
    330  * @thread  The emulation thread (EMT).
    331  */
    332290PDMR3DECL(int) PDMR3ThreadDestroy(PPDMTHREAD pThread, int *pRcThread);
    333 
    334 /**
    335  * Called by the PDM thread in response to a wakeup call with
    336  * suspending as the new state.
    337  *
    338  * The thread will block in side this call until the state is changed in
    339  * response to a VM state change or to the device/driver/whatever calling the
    340  * PDMR3ThreadResume API.
    341  *
    342  * @returns VBox status code.
    343  *          On failure, terminate the thread.
    344  * @param   pThread     The PDM thread.
    345  */
    346291PDMR3DECL(int) PDMR3ThreadIAmSuspending(PPDMTHREAD pThread);
    347 
    348 /**
    349  * Called by the PDM thread in response to a resuming state.
    350  *
    351  * The purpose of this API is to tell the PDMR3ThreadResume caller that
    352  * the the PDM thread has successfully resumed. It will also do the
    353  * state transition from the resuming to the running state.
    354  *
    355  * @returns VBox status code.
    356  *          On failure, terminate the thread.
    357  * @param   pThread     The PDM thread.
    358  */
    359292PDMR3DECL(int) PDMR3ThreadIAmRunning(PPDMTHREAD pThread);
    360 
    361 /**
    362  * Called by the PDM thread instead of RTThreadSleep.
    363  *
    364  * The difference is that the sleep will be interrupted on state change. The
    365  * thread must be in the running state, otherwise it will return immediately.
    366  *
    367  * @returns VBox status code.
    368  * @retval  VINF_SUCCESS on success or state change.
    369  * @retval  VERR_INTERRUPTED on signal or APC.
    370  *
    371  * @param   pThread     The PDM thread.
    372  * @param   cMillies    The number of milliseconds to sleep.
    373  */
    374293PDMR3DECL(int) PDMR3ThreadSleep(PPDMTHREAD pThread, unsigned cMillies);
    375 
    376 /**
    377  * Suspends the thread.
    378  *
    379  * This can be called at the power off / suspend notifications to suspend the
    380  * PDM thread a bit early. The thread will be automatically suspend upon
    381  * completion of the device/driver notification cycle.
    382  *
    383  * The caller is responsible for serializing the control operations on the
    384  * thread. That basically means, always do these calls from the EMT.
    385  *
    386  * @returns VBox status code.
    387  * @param   pThread     The PDM thread.
    388  */
    389294PDMR3DECL(int) PDMR3ThreadSuspend(PPDMTHREAD pThread);
    390 
    391 /**
    392  * Resumes the thread.
    393  *
    394  * This can be called the power on / resume notifications to resume the
    395  * PDM thread a bit early. The thread will be automatically resumed upon
    396  * return from these two notification callbacks (devices/drivers).
    397  *
    398  * The caller is responsible for serializing the control operations on the
    399  * thread. That basically means, always do these calls from the EMT.
    400  *
    401  * @returns VBox status code.
    402  * @param   pThread     The PDM thread.
    403  */
    404295PDMR3DECL(int) PDMR3ThreadResume(PPDMTHREAD pThread);
    405296#endif /* IN_RING3 */
  • trunk/include/VBox/pdmusb.h

    r12895 r12986  
    763763typedef DECLCALLBACK(int) FNPDMVBOXUSBREGISTER(PCPDMUSBREGCB pCallbacks, uint32_t u32Version);
    764764
    765 
    766 /**
    767  * Creates a USB proxy device instance.
    768  *
    769  * This will find an appropriate HUB for the USB device, create the necessary CFGM stuff
    770  * and try instantiate the proxy device.
    771  *
    772  * @returns VBox status code.
    773  * @param   pVM             The VM handle.
    774  * @param   pUuid           The UUID thats to be associated with the device.
    775  * @param   fRemote         Whether it's a remove or local device.
    776  * @param   pszAddress      The address string.
    777  * @param   pvBackend       Pointer to the backend.
    778  * @param   iUsbVersion     The preferred USB version.
    779  * @param   fMaskedIfs      The interfaces to hide from the guest.
    780  */
    781 PDMR3DECL(int) PDMR3USBCreateProxyDevice(PVM pVM, PCRTUUID pUuid, bool fRemote, const char *pszAddress, void *pvBackend,
    782                                          uint32_t iUsbVersion, uint32_t fMaskedIfs);
    783 
    784 /**
    785  * Detaches and destroys a USB device.
    786  *
    787  * @returns VBox status code.
    788  * @param   pVM             The VM handle.
    789  * @param   pUuid           The UUID associated with the device to detach.
    790  * @thread  EMT
    791  */
    792 PDMR3DECL(int) PDMR3USBDetachDevice(PVM pVM, PCRTUUID pUuid);
    793 
    794 /**
    795  * Checks if there are any USB hubs attached.
    796  *
    797  * @returns true / false accordingly.
    798  * @param   pVM     Pointer to the shared VM structure.
    799  */
     765PDMR3DECL(int)  PDMR3USBCreateProxyDevice(PVM pVM, PCRTUUID pUuid, bool fRemote, const char *pszAddress, void *pvBackend,
     766                                          uint32_t iUsbVersion, uint32_t fMaskedIfs);
     767PDMR3DECL(int)  PDMR3USBDetachDevice(PVM pVM, PCRTUUID pUuid);
    800768PDMR3DECL(bool) PDMR3USBHasHub(PVM pVM);
    801769
Note: See TracChangeset for help on using the changeset viewer.

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