Changeset 15798 in vbox for trunk/src/VBox
- Timestamp:
- Jan 5, 2009 1:03:42 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 41375
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r15400 r15798 1013 1013 generic/RTLogWriteStdOut-stub-generic.cpp \ 1014 1014 generic/mppresent-generic.cpp \ 1015 r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp \1016 r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp \1017 1015 r0drv/linux/alloc-r0drv-linux.c \ 1018 1016 r0drv/linux/assert-r0drv-linux.c \ … … 1023 1021 r0drv/linux/process-r0drv-linux.c \ 1024 1022 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \ 1023 r0drv/linux/RTThreadPreemptDisable-r0drv-linux.c \ 1024 r0drv/linux/RTThreadPreemptRestore-r0drv-linux.c \ 1025 1025 r0drv/linux/semevent-r0drv-linux.c \ 1026 1026 r0drv/linux/semeventmulti-r0drv-linux.c \ -
trunk/src/VBox/Runtime/r0drv/linux/RTThreadPreemptDisable-r0drv-linux.c
r15797 r15798 5 5 6 6 /* 7 * Copyright (C) 200 8Sun Microsystems, Inc.7 * Copyright (C) 2009 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 32 32 * Header Files * 33 33 *******************************************************************************/ 34 #include "the-linux-kernel.h" 35 34 36 #include <iprt/thread.h> 35 37 #include <iprt/assert.h> … … 38 40 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState) 39 41 { 40 AssertPtr(pState); 41 Assert(pState->uchDummy != 42); 42 pState->uchDummy = 42; 42 /* 43 * Note: This call is a NOP if CONFIG_PREEMPT is not enabled in the Linux kernel 44 * configuration. In that case, schedule() is only called need_resched() is set 45 * which is tested just before we return to R3 (not when returning from R0 to R0). 46 */ 47 preempt_disable(); 43 48 } 44 -
trunk/src/VBox/Runtime/r0drv/linux/RTThreadPreemptRestore-r0drv-linux.c
r15797 r15798 5 5 6 6 /* 7 * Copyright (C) 200 8Sun Microsystems, Inc.7 * Copyright (C) 2009 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 32 32 * Header Files * 33 33 *******************************************************************************/ 34 #include "the-linux-kernel.h" 35 34 36 #include <iprt/thread.h> 35 37 #include <iprt/assert.h> … … 38 40 RTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState) 39 41 { 40 AssertPtr(pState); 41 Assert(pState->uchDummy == 42); 42 pState->uchDummy = 0; 42 preempt_enable(); 43 43 } 44
Note:
See TracChangeset
for help on using the changeset viewer.