Changeset 24179 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Oct 30, 2009 10:26:43 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/initterm-r0drv.cpp
r22052 r24179 83 83 if (RT_SUCCESS(rc)) 84 84 { 85 #if !defined(RT_OS_LINUX) 85 #if !defined(RT_OS_LINUX) /** @todo implement thread2-r0drv-linux.c */ 86 86 rc = rtThreadInit(); 87 87 #endif … … 91 91 rc = rtR0MpNotificationInit(); 92 92 if (RT_SUCCESS(rc)) 93 { 93 94 rc = rtR0PowerNotificationInit(); 94 #endif 95 if (RT_SUCCESS(rc)) 96 return rc; 97 rtR0MpNotificationTerm(); 98 } 99 #else 95 100 if (RT_SUCCESS(rc)) 96 101 return rc; 102 #endif 103 #if !defined(RT_OS_LINUX) /** @todo implement thread2-r0drv-linux.c */ 104 rtThreadTerm(); 105 #endif 97 106 } 98 99 107 rtR0TermNative(); 100 108 } … … 102 110 } 103 111 RT_EXPORT_SYMBOL(RTR0Init); 112 113 114 static void rtR0Term(void) 115 { 116 #if !defined(RT_OS_LINUX) /** @todo implement thread2-r0drv-linux.c */ 117 rtThreadTerm(); 118 #endif 119 #ifndef IN_GUEST /* play safe for now */ 120 rtR0PowerNotificationTerm(); 121 rtR0MpNotificationTerm(); 122 #endif 123 rtR0TermNative(); 124 } 104 125 105 126 … … 112 133 RT_ASSERT_PREEMPTIBLE(); 113 134 114 /*115 * Last user does the cleanup.116 */117 135 cNewUsers = ASMAtomicDecS32(&g_crtR0Users); 118 136 Assert(cNewUsers >= 0); 119 if (cNewUsers != 0) 120 return; 121 122 #if !defined(RT_OS_LINUX) 123 rtThreadTerm(); 124 #endif 125 #ifndef IN_GUEST /* play safe for now */ 126 rtR0PowerNotificationTerm(); 127 rtR0MpNotificationTerm(); 128 #endif 129 rtR0TermNative(); 137 if (cNewUsers == 0) 138 rtR0Term(); 130 139 } 131 140 RT_EXPORT_SYMBOL(RTR0Term); 132 141 142 143 /* Note! Should *not* be exported since it's only for static linking. */ 144 RTR0DECL(void) RTR0TermForced(void) 145 { 146 RT_ASSERT_PREEMPTIBLE(); 147 AssertMsg(g_crtR0Users == 1, ("%d\n", g_crtR0Users)); 148 149 rtR0Term(); 150 } 151
Note:
See TracChangeset
for help on using the changeset viewer.