Changeset 37575 in vbox for trunk/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp
- Timestamp:
- Jun 21, 2011 12:40:01 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp
r36555 r37575 34 34 #include <iprt/err.h> 35 35 #include <iprt/assert.h> 36 #include <iprt/darwin/machkernel.h> 36 37 #include "internal/initterm.h" 38 37 39 38 40 … … 41 43 *******************************************************************************/ 42 44 /** Pointer to the lock group used by IPRT. */ 43 lck_grp_t *g_pDarwinLockGroup = NULL; 45 lck_grp_t *g_pDarwinLockGroup = NULL; 46 /** Pointer to the ast_pending function, if found. */ 47 PFNR0DARWINASTPENDING g_pfnR0DarwinAstPending = NULL; 48 /** Pointer to the cpu_interrupt function, if found. */ 49 PFNR0DARWINCPUINTERRUPT g_pfnR0DarwinCpuInterrupt = NULL; 44 50 45 51 … … 56 62 */ 57 63 int rc = rtThreadPreemptDarwinInit(); 64 if (RT_SUCCESS(rc)) 65 { 66 /* 67 * Try resolve kernel symbols we need but apple don't wish to give us. 68 */ 69 RTR0MACHKERNEL hKernel; 70 rc = RTR0MachKernelOpen("/mach_kernel", &hKernel); 71 if (RT_SUCCESS(rc)) 72 { 73 RTR0MachKernelGetSymbol(hKernel, "ast_pending", (void **)&g_pfnR0DarwinAstPending); 74 printf("ast_pending=%p\n", g_pfnR0DarwinAstPending); 75 RTR0MachKernelGetSymbol(hKernel, "cpu_interrupt", (void **)&g_pfnR0DarwinCpuInterrupt); 76 printf("cpu_interrupt=%p\n", g_pfnR0DarwinCpuInterrupt); 77 RTR0MachKernelClose(hKernel); 78 } 79 if (RT_FAILURE(rc)) 80 { 81 printf("rtR0InitNative: warning! failed to resolve special kernel symbols\n"); 82 rc = VINF_SUCCESS; 83 } 84 } 58 85 if (RT_FAILURE(rc)) 59 86 rtR0TermNative();
Note:
See TracChangeset
for help on using the changeset viewer.