- Timestamp:
- Aug 30, 2007 9:57:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMThread.cpp
r4421 r4455 64 64 rc = pThread->u.Dev.pfnWakeUp(pThread->u.Dev.pDevIns, pThread); 65 65 break; 66 66 67 67 case PDMTHREADTYPE_USB: 68 68 rc = pThread->u.Usb.pfnWakeUp(pThread->u.Usb.pUsbIns, pThread); … … 140 140 /* 141 141 * Create the thread and wait for it to initialize. 142 * The newly created thread will set the PDMTHREAD::Thread member. 142 143 */ 143 rc = RTThreadCreate(&pThread->Thread, pdmR3ThreadMain, pThread, cbStack, enmType, RTTHREADFLAGS_WAITABLE, pszName); 144 RTTHREAD Thread; 145 rc = RTThreadCreate(&Thread, pdmR3ThreadMain, pThread, cbStack, enmType, RTTHREADFLAGS_WAITABLE, pszName); 144 146 if (RT_SUCCESS(rc)) 145 147 { 146 rc = RTThreadUserWait( pThread->Thread, 60*1000);148 rc = RTThreadUserWait(Thread, 60*1000); 147 149 if ( RT_SUCCESS(rc) 148 150 && pThread->enmState != PDMTHREADSTATE_SUSPENDED) … … 160 162 pVM->pdm.s.pThreadsTail = pThread; 161 163 162 rc = RTThreadUserReset( pThread->Thread);164 rc = RTThreadUserReset(Thread); 163 165 AssertRC(rc); 164 166 return rc; … … 166 168 167 169 /* bailout */ 168 RTThreadWait( pThread->Thread, 60*1000, NULL);170 RTThreadWait(Thread, 60*1000, NULL); 169 171 } 170 172 RTSemEventMultiDestroy(pThread->Internal.s.BlockEvent); … … 180 182 /** 181 183 * Device Helper for creating a thread associated with a device. 182 * 183 * @returns VBox status code. 184 * @param pVM The VM handle. 184 * 185 * @returns VBox status code. 186 * @param pVM The VM handle. 185 187 * @param pDevIns The device instance. 186 188 * @param ppThread Where to store the thread 'handle'. … … 212 214 /** 213 215 * USB Device Helper for creating a thread associated with an USB device. 214 * 215 * @returns VBox status code. 216 * @param pVM The VM handle. 216 * 217 * @returns VBox status code. 218 * @param pVM The VM handle. 217 219 * @param pUsbIns The USB device instance. 218 220 * @param ppThread Where to store the thread 'handle'. … … 244 246 /** 245 247 * Driver Helper for creating a thread associated with a driver. 246 * 247 * @returns VBox status code. 248 * @param pVM The VM handle. 248 * 249 * @returns VBox status code. 250 * @param pVM The VM handle. 249 251 * @param pDrvIns The driver instance. 250 252 * @param ppThread Where to store the thread 'handle'. … … 276 278 /** 277 279 * Creates a PDM thread for internal use in the VM. 278 * 279 * @returns VBox status code. 280 * @param pVM The VM handle. 280 * 281 * @returns VBox status code. 282 * @param pVM The VM handle. 281 283 * @param ppThread Where to store the thread 'handle'. 282 284 * @param pvUser The user argument to the thread function. … … 306 308 /** 307 309 * Creates a PDM thread for VM use by some external party. 308 * 309 * @returns VBox status code. 310 * @param pVM The VM handle. 310 * 311 * @returns VBox status code. 312 * @param pVM The VM handle. 311 313 * @param ppThread Where to store the thread 'handle'. 312 314 * @param pvUser The user argument to the thread function. … … 442 444 * Destroys all threads associated with a device. 443 445 * 444 * This function is called by PDMDevice when a device is 446 * This function is called by PDMDevice when a device is 445 447 * destroyed (not currently implemented). 446 * 448 * 447 449 * @returns VBox status code of the first failure. 448 450 * @param pVM The VM handle. … … 476 478 * 477 479 * This function is called by PDMUsb when a device is destroyed. 478 * 480 * 479 481 * @returns VBox status code of the first failure. 480 482 * @param pVM The VM handle. … … 508 510 * 509 511 * This function is called by PDMDriver when a driver is destroyed. 510 * 512 * 511 513 * @returns VBox status code of the first failure. 512 514 * @param pVM The VM handle. … … 686 688 PPDMTHREAD pThread = (PPDMTHREAD)pvUser; 687 689 Log(("PDMThread: Initializing thread %RTthrd / %p / '%s'...\n", Thread, pThread, RTThreadGetName(Thread))); 690 pThread->Thread = Thread; 688 691 689 692 /* … … 820 823 * PDM thread a bit early. The thread will be automatically suspend upon 821 824 * completion of the device/driver notification cycle. 822 * 825 * 823 826 * The caller is responsible for serializing the control operations on the 824 827 * thread. That basically means, always do these calls from the EMT.
Note:
See TracChangeset
for help on using the changeset viewer.