儲存庫 vbox 的更動 37297
- 時間撮記:
- 2011-6-1 下午04:18:21 (13 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c
r37294 r37297 85 85 AssertRelease(idCpu == RTMpCpuId()); /* ASSUMES iCpu == RTCPUID */ 86 86 87 switch (ulNativeEvent) 88 { 89 # ifdef CPU_DOWN_FAILED 90 case CPU_DOWN_FAILED: 91 # if defined(CPU_TASKS_FROZEN) && defined(CPU_DOWN_FAILED_FROZEN) 92 case CPU_DOWN_FAILED_FROZEN: 93 # endif 94 # endif 95 case CPU_ONLINE: 96 # if defined(CPU_TASKS_FROZEN) && defined(CPU_ONLINE_FROZEN) 97 case CPU_ONLINE_FROZEN: 98 # endif 99 rtMpNotificationDoCallbacks(RTMPEVENT_ONLINE, idCpu); 100 break; 101 102 # ifdef CPU_DOWN_PREPARE 103 case CPU_DOWN_PREPARE: 104 # if defined(CPU_TASKS_FROZEN) && defined(CPU_DOWN_PREPARE_FROZEN) 105 case CPU_DOWN_PREPARE_FROZEN: 106 # endif 107 rtMpNotificationDoCallbacks(RTMPEVENT_OFFLINE, idCpu); 108 break; 109 # endif 110 } 111 } 112 113 114 /** 115 * The native callback. 116 * 117 * @returns NOTIFY_DONE. 118 * @param pNotifierBlock Pointer to g_NotifierBlock. 119 * @param ulNativeEvent The native event. 120 * @param pvCpu The cpu id cast into a pointer value. 121 * @remarks This can fire with preemption enabled and on any CPU. 122 */ 123 static int rtMpNotificationLinuxCallback(struct notifier_block *pNotifierBlock, unsigned long ulNativeEvent, void *pvCpu) 124 { 125 int rc; 126 bool fProcessEvent = false; 127 RTCPUID idCpu = (uintptr_t)pvCpu; 128 NOREF(pNotifierBlock); 129 87 130 /* 88 131 * Note that redhat/CentOS ported _some_ of the FROZEN macros … … 91 134 * the individual event variants. 92 135 */ 93 94 /* ASSUMES iCpu == RTCPUID */95 136 switch (ulNativeEvent) 96 137 { … … 105 146 # endif 106 147 if (!RTCpuSetIsMember(&g_MpPendingOfflineSet, idCpu)) 107 return;148 break; /* fProcessEvents = false */ 108 149 /* fall thru */ 109 150 # endif … … 115 156 RTCpuSetDel(&g_MpPendingOfflineSet, idCpu); 116 157 # endif 117 rtMpNotificationDoCallbacks(RTMPEVENT_ONLINE, idCpu);158 fProcessEvent = true; 118 159 break; 119 160 … … 128 169 case CPU_DOWN_PREPARE_FROZEN: 129 170 # endif 171 fProcessEvent = true; 130 172 # else 131 173 case CPU_DEAD: … … 133 175 case CPU_DEAD_FROZEN: 134 176 # endif 135 # endif 136 rtMpNotificationDoCallbacks(RTMPEVENT_OFFLINE, idCpu); 177 /* Don't process CPU_DEAD notifications. */ 178 # endif 137 179 # ifdef CPU_DOWN_FAILED 138 180 RTCpuSetAdd(&g_MpPendingOfflineSet, idCpu); … … 140 182 break; 141 183 } 142 } 143 144 145 /** 146 * The native callback. 147 * 148 * @returns NOTIFY_DONE. 149 * @param pNotifierBlock Pointer to g_NotifierBlock. 150 * @param ulNativeEvent The native event. 151 * @param pvCpu The cpu id cast into a pointer value. 152 * @remarks This can fire with preemption enabled and on any CPU. 153 */ 154 static int rtMpNotificationLinuxCallback(struct notifier_block *pNotifierBlock, unsigned long ulNativeEvent, void *pvCpu) 155 { 156 int rc; 157 RTCPUID idCpu = (uintptr_t)pvCpu; 158 NOREF(pNotifierBlock); 184 185 if (!fProcessEvent) 186 return NOTIFY_DONE; 159 187 160 188 /*
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器