Changeset 7206 in vbox
- Timestamp:
- Feb 28, 2008 4:42:10 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r6791 r7206 606 606 607 607 /** 608 * Execute callback on all cpus/cores (SUPR0ExecuteCallback) 609 */ 610 #define SUPDRVEXECCALLBACK_CPU_ALL (~0) 611 612 /** 608 613 * Security objectype. 609 614 */ … … 635 640 /** Pointer to a FNSUPDRVDESTRUCTOR(). */ 636 641 typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR; 642 643 /** 644 * Per cpu execution callback (SUPR0ExecuteCallback) 645 * 646 * @param pSession Session object 647 * @param pvUser The first user argument. 648 */ 649 typedef DECLCALLBACK(void) FNSUPDRVEXECCALLBACK(PSUPDRVSESSION pSession, void *pvUser1); 650 /** Pointer to a PFNSUPDRVEXECCALLBACK(). */ 651 typedef FNSUPDRVEXECCALLBACK *PFNSUPDRVEXECCALLBACK; 637 652 638 653 SUPR0DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType, PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2); … … 655 670 SUPR0DECL(int) SUPR0GipUnmap(PSUPDRVSESSION pSession); 656 671 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...); 672 SUPR0DECL(int) SUPR0ExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu); 657 673 658 674 /** @} */ -
trunk/src/VBox/HostDrivers/Support/SUPDRV.h
r6418 r7206 757 757 bool VBOXCALL supdrvOSGetForcedAsyncTscMode(void); 758 758 #endif 759 int VBOXCALL supdrvOSExecuteCallback(PSUPDRVSESSION pSession, PFNSUPDRVEXECCALLBACK pfnCallback, void *pvUser, unsigned uCpu); 759 760 760 761 -
trunk/src/VBox/HostDrivers/Support/SUPDRVIOC.h
r5999 r7206 178 178 * The upper 16-bit is the major version, the the lower the minor version. 179 179 * When incompatible changes are made, the upper major number has to be changed. */ 180 #define SUPDRVIOC_VERSION 0x000 60000180 #define SUPDRVIOC_VERSION 0x00070000 181 181 182 182 /** SUP_IOCTL_COOKIE. */ -
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r7130 r7206 119 119 { "SUPR0PageFree", (void *)SUPR0PageFree }, 120 120 { "SUPR0Printf", (void *)SUPR0Printf }, 121 { "SUPR0ExecuteCallback", (void *)SUPR0ExecuteCallback }, 121 122 { "RTMemAlloc", (void *)RTMemAlloc }, 122 123 { "RTMemAllocZ", (void *)RTMemAllocZ }, … … 137 138 { "RTR0MemObjGetPagePhysAddr", (void *)RTR0MemObjGetPagePhysAddr }, 138 139 { "RTR0MemObjFree", (void *)RTR0MemObjFree }, 139 /* These do esn't work yet on linux - use fast mutexes!140 /* These don't work yet on linux - use fast mutexes! 140 141 { "RTSemMutexCreate", (void *)RTSemMutexCreate }, 141 142 { "RTSemMutexRequest", (void *)RTSemMutexRequest }, … … 2207 2208 } 2208 2209 2210 /** 2211 * Executes a callback handler on a specific cpu or all cpus 2212 * 2213 * @returns IPRT status code. 2214 * @param pSession The session. 2215 * @param pfnCallback Callback handler 2216 * @param pvUser The first user argument. 2217 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 2218 */ 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 2209 2230 2210 2231 /** -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r7137 r7206 331 331 { "SUPR0MemFree", 0xefef000a }, 332 332 { "SUPR0Printf", 0xefef000b }, 333 { "RTMemAlloc", 0xefef000c }, 334 { "RTMemAllocZ", 0xefef000d }, 335 { "RTMemFree", 0xefef000e }, 333 { "SUPR0ExecuteCallback", 0xefef000c }, 334 { "RTMemAlloc", 0xefef000d }, 335 { "RTMemAllocZ", 0xefef000e }, 336 { "RTMemFree", 0xefef000f }, 336 337 { "RTR0MemObjAddress", 0xefef0010 }, 337 338 { "RTR0MemObjAddressR3", 0xefef0011 }, -
trunk/src/VBox/HostDrivers/Support/SUPR0.def
r5999 r7206 42 42 SUPR0MemFree 43 43 SUPR0Printf 44 SUPR0ExecuteCallback 44 45 RTMemAlloc 45 46 RTMemAllocZ -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r5999 r7206 640 640 641 641 /** 642 * Executes a callback handler on a specific cpu or all cpus 643 * 644 * @returns IPRT status code. 645 * @param pSession The session. 646 * @param pfnCallback Callback handler 647 * @param pvUser The first user argument. 648 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 649 */ 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 /** 642 661 * Converts a supdrv error code to a darwin error code. 643 662 * -
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r4988 r7206 531 531 } 532 532 533 /** 534 * Executes a callback handler on a specific cpu or all cpus 535 * 536 * @returns IPRT status code. 537 * @param pSession The session. 538 * @param pfnCallback Callback handler 539 * @param pvUser The first user argument. 540 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 541 */ 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 } 533 551 534 552 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...) -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r7130 r7206 973 973 } 974 974 975 /** 976 * Executes a callback handler on a specific cpu or all cpus 977 * 978 * @returns IPRT status code. 979 * @param pSession The session. 980 * @param pfnCallback Callback handler 981 * @param pvUser The first user argument. 982 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 983 */ 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 975 994 976 995 /** -
trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
r4935 r7206 377 377 } 378 378 379 /** 380 * Executes a callback handler on a specific cpu or all cpus 381 * 382 * @returns IPRT status code. 383 * @param pSession The session. 384 * @param pfnCallback Callback handler 385 * @param pvUser The first user argument. 386 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 387 */ 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 } 379 397 380 398 /** -
trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
r6918 r7206 804 804 } 805 805 806 /** 807 * Executes a callback handler on a specific cpu or all cpus 808 * 809 * @returns IPRT status code. 810 * @param pSession The session. 811 * @param pfnCallback Callback handler 812 * @param pvUser The first user argument. 813 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 814 */ 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 } 806 824 807 825 RTDECL(int) SUPR0Printf(const char *pszFormat, ...) -
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r5999 r7206 455 455 } 456 456 457 /** 458 * Executes a callback handler on a specific cpu or all cpus 459 * 460 * @returns IPRT status code. 461 * @param pSession The session. 462 * @param pfnCallback Callback handler 463 * @param pvUser The first user argument. 464 * @param uCpu Cpu id or SUPDRVEXECCALLBACK_CPU_ALL for all cpus 465 */ 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 } 457 475 458 476 /**
Note:
See TracChangeset
for help on using the changeset viewer.