Changeset 7272 in vbox for trunk/src/VBox
- Timestamp:
- Mar 4, 2008 12:33:43 PM (17 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDRV.h
r7206 r7272 700 700 KDPC GipDpc; 701 701 /** The GIP DPC objects for updating per-cpu data. */ 702 KDPC aGipCpuDpcs[ 32];702 KDPC aGipCpuDpcs[64]; 703 703 /** Pointer to the MDL for the pGip page. */ 704 704 PMDL pGipMdl; … … 757 757 bool VBOXCALL supdrvOSGetForcedAsyncTscMode(void); 758 758 #endif 759 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu);760 759 761 760 -
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r7206 r7272 38 38 #include <iprt/thread.h> 39 39 #include <iprt/process.h> 40 #include <iprt/mp.h> 40 41 #include <iprt/log.h> 41 42 … … 119 120 { "SUPR0PageFree", (void *)SUPR0PageFree }, 120 121 { "SUPR0Printf", (void *)SUPR0Printf }, 121 { "SUPR0ExecuteCallback", (void *)SUPR0ExecuteCallback },122 122 { "RTMemAlloc", (void *)RTMemAlloc }, 123 123 { "RTMemAllocZ", (void *)RTMemAllocZ }, … … 184 184 { "RTThreadUserWaitNoResume", (void *)RTThreadUserWaitNoResume }, 185 185 #endif 186 { "RTMpOnAll", (void *)RTMpOnAll }, 187 { "RTMpOnOthers", (void *)RTMpOnOthers }, 188 { "RTMpOnSpecific", (void *)RTMpOnSpecific }, 186 189 { "RTLogDefaultInstance", (void *)RTLogDefaultInstance }, 187 190 { "RTLogRelDefaultInstance", (void *)RTLogRelDefaultInstance }, … … 2208 2211 } 2209 2212 2210 /**2211 * Executes a callback handler on a specific cpu or all cpus2212 *2213 * @returns IPRT status code.2214 * @param pSession The session.2215 * @param pfnCallback Callback handler2216 * @param pvUser The first user argument.2217 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus2218 */2219 SUPR0DECL(int) SUPR0ExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)2220 {2221 int rc;2222 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER;2223 2224 RTSpinlockAcquire(pSession->Spinlock, &SpinlockTmp);2225 rc = supdrvOSExecuteCallback(pSession, pfnCallback, pvUser, uCpu);2226 RTSpinlockRelease(pSession->Spinlock, &SpinlockTmp);2227 return rc;2228 }2229 2230 2213 2231 2214 /** -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r7206 r7272 640 640 641 641 /** 642 * Executes a callback handler on a specific cpu or all cpus643 *644 * @returns IPRT status code.645 * @param pSession The session.646 * @param pfnCallback Callback handler647 * @param pvUser The first user argument.648 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus649 */650 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)651 {652 NOREF(pSession);653 NOREF(pfnCallback);654 NOREF(pvUser);655 NOREF(uCpu);656 /** @todo */657 return VERR_NOT_IMPLEMENTED;658 }659 660 /**661 642 * Converts a supdrv error code to a darwin error code. 662 643 * -
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r7206 r7272 531 531 } 532 532 533 /**534 * Executes a callback handler on a specific cpu or all cpus535 *536 * @returns IPRT status code.537 * @param pSession The session.538 * @param pfnCallback Callback handler539 * @param pvUser The first user argument.540 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus541 */542 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)543 {544 NOREF(pSession);545 NOREF(pfnCallback);546 NOREF(pvUser);547 NOREF(uCpu);548 /** @todo */549 return VERR_NOT_IMPLEMENTED;550 }551 533 552 534 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...) -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r7206 r7272 973 973 } 974 974 975 /**976 * Executes a callback handler on a specific cpu or all cpus977 *978 * @returns IPRT status code.979 * @param pSession The session.980 * @param pfnCallback Callback handler981 * @param pvUser The first user argument.982 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus983 */984 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)985 {986 NOREF(pSession);987 NOREF(pfnCallback);988 NOREF(pvUser);989 NOREF(uCpu);990 /** @todo */991 return VERR_NOT_IMPLEMENTED;992 }993 994 975 995 976 /** -
trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
r7206 r7272 378 378 379 379 /** 380 * Executes a callback handler on a specific cpu or all cpus381 *382 * @returns IPRT status code.383 * @param pSession The session.384 * @param pfnCallback Callback handler385 * @param pvUser The first user argument.386 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus387 */388 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)389 {390 NOREF(pSession);391 NOREF(pfnCallback);392 NOREF(pvUser);393 NOREF(uCpu);394 /** @todo */395 return VERR_NOT_IMPLEMENTED;396 }397 398 /**399 380 * Callback for writing to the log buffer. 400 381 * -
trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
r7206 r7272 804 804 } 805 805 806 /**807 * Executes a callback handler on a specific cpu or all cpus808 *809 * @returns IPRT status code.810 * @param pSession The session.811 * @param pfnCallback Callback handler812 * @param pvUser The first user argument.813 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus814 */815 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)816 {817 NOREF(pSession);818 NOREF(pfnCallback);819 NOREF(pvUser);820 NOREF(uCpu);821 /** @todo */822 return VERR_NOT_IMPLEMENTED;823 }824 806 825 807 RTDECL(int) SUPR0Printf(const char *pszFormat, ...) -
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r7206 r7272 456 456 457 457 /** 458 * Executes a callback handler on a specific cpu or all cpus459 *460 * @returns IPRT status code.461 * @param pSession The session.462 * @param pfnCallback Callback handler463 * @param pvUser The first user argument.464 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus465 */466 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu)467 {468 NOREF(pSession);469 NOREF(pfnCallback);470 NOREF(pvUser);471 NOREF(uCpu);472 /** @todo */473 return VERR_NOT_IMPLEMENTED;474 }475 476 /**477 458 * Gets the monotone timestamp (nano seconds). 478 459 * @returns NanoTS. … … 635 616 KIRQL oldIrql; 636 617 637 Assert(KeGetCurrentIrql() <= DISPATCH_LEVEL); 618 /* KeQueryActiveProcessors must be executed at IRQL < DISPATCH_LEVEL */ 619 Assert(KeGetCurrentIrql() < DISPATCH_LEVEL); 620 KAFFINITY Mask = KeQueryActiveProcessors(); 621 622 /* Raise the IRQL to DISPATCH_LEVEL so we can't be rescheduled to another cpu */ 638 623 KeRaiseIrql(DISPATCH_LEVEL, &oldIrql); 639 624 640 625 /* 641 * We cannot do other than assume a 1:1 relation 626 * We cannot do other than assume a 1:1 relationship between the 642 627 * affinity mask and the process despite the warnings in the docs. 643 628 * If someone knows a better way to get this done, please let bird know. 644 629 */ 645 /** @todo our IRQL is too high for KeQueryActiveProcessors!! */646 630 unsigned iSelf = KeGetCurrentProcessorNumber(); 647 KAFFINITY Mask = KeQueryActiveProcessors();648 631 649 632 for (unsigned i = 0; i < RT_ELEMENTS(pDevExt->aGipCpuDpcs); i++)
Note:
See TracChangeset
for help on using the changeset viewer.