Changeset 057e77f in mainline for kernel/generic/include/preemption.h
- Timestamp:
- 2012-07-16T15:31:56Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0cf813d
- Parents:
- 0594c7ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/preemption.h
r0594c7ea r057e77f 40 40 #include <debug.h> 41 41 42 #define PREEMPTION_INC (1 << 1) 43 #define PREEMPTION_NEEDED_FLAG (1 << 0) 44 #define PREEMPTION_NEEDED (THE->preemption & PREEMPTION_NEEDED_FLAG) 42 #define PREEMPTION_INC (1 << 0) 45 43 #define PREEMPTION_DISABLED (PREEMPTION_INC <= THE->preemption) 46 44 #define PREEMPTION_ENABLED (!PREEMPTION_DISABLED) … … 53 51 } while (0) 54 52 55 /** Restores preemption and reschedules if out time slice already elapsed.*/53 /** Restores preemption but never reschedules. */ 56 54 #define preemption_enable() \ 57 do { \58 preemption_enable_noresched(); \59 \60 if (PREEMPTION_ENABLED && PREEMPTION_NEEDED) { \61 preemption_enabled_scheduler(); \62 } \63 } while (0)64 65 /** Restores preemption but never reschedules. */66 #define preemption_enable_noresched() \67 55 do { \ 68 56 ASSERT(PREEMPTION_DISABLED); \ … … 72 60 73 61 74 extern void preemption_enabled_scheduler(void);75 extern void preemption_set_needed(void);76 extern void preemption_clear_needed(void);77 78 62 #endif 79 63
Note:
See TracChangeset
for help on using the changeset viewer.