Changeset 57276 in vbox for trunk/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
- Timestamp:
- Aug 11, 2015 2:39:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
r56955 r57276 167 167 RTDECL(int) RTThreadCtxHookCreate(PRTTHREADCTXHOOK phCtxHook, uint32_t fFlags, PFNRTTHREADCTXHOOK pfnCallback, void *pvUser) 168 168 { 169 IPRT_LINUX_SAVE_EFL_AC(); 170 169 171 /* 170 172 * Validate input. … … 181 183 pThis = (PRTTHREADCTXHOOKINT)RTMemAllocZ(sizeof(*pThis)); 182 184 if (RT_UNLIKELY(!pThis)) 185 { 186 IPRT_LINUX_RESTORE_EFL_AC(); 183 187 return VERR_NO_MEMORY; 188 } 184 189 pThis->u32Magic = RTTHREADCTXHOOKINT_MAGIC; 185 190 pThis->hOwner = RTThreadNativeSelf(); … … 196 201 197 202 *phCtxHook = pThis; 203 IPRT_LINUX_RESTORE_EFL_AC(); 198 204 return VINF_SUCCESS; 199 205 } … … 203 209 RTDECL(int ) RTThreadCtxHookDestroy(RTTHREADCTXHOOK hCtxHook) 204 210 { 211 IPRT_LINUX_SAVE_EFL_AC(); 212 205 213 /* 206 214 * Validate input. … … 232 240 RTMemFree(pThis); 233 241 242 IPRT_LINUX_RESTORE_EFL_AC(); 234 243 return VINF_SUCCESS; 235 244 } … … 250 259 if (!pThis->fEnabled) 251 260 { 261 IPRT_LINUX_SAVE_EFL_AC(); 252 262 Assert(pThis->PreemptOps.sched_out == rtThreadCtxHooksLnxSchedOut); 253 263 Assert(pThis->PreemptOps.sched_in == rtThreadCtxHooksLnxSchedIn); … … 260 270 preempt_notifier_register(&pThis->LnxPreemptNotifier); 261 271 preempt_enable(); 272 273 IPRT_LINUX_RESTORE_EFL_AC(); 262 274 } 263 275 … … 284 296 */ 285 297 if (pThis->fEnabled) 298 { 299 IPRT_LINUX_SAVE_EFL_AC(); 286 300 rtThreadCtxHookDisable(pThis); 301 IPRT_LINUX_RESTORE_EFL_AC(); 302 } 287 303 } 288 304 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.