Changeset 057e77f in mainline for kernel/generic/include/preemption.h


Ignore:
Timestamp:
2012-07-16T15:31:56Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0cf813d
Parents:
0594c7ea
Message:

preemption_disable: Removed failed attempt at rescheduling once preemption is enabled (and needed). Once again, preemption_enable() never reschedules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/preemption.h

    r0594c7ea r057e77f  
    4040#include <debug.h>
    4141
    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)
    4543#define PREEMPTION_DISABLED    (PREEMPTION_INC <= THE->preemption)
    4644#define PREEMPTION_ENABLED     (!PREEMPTION_DISABLED)
     
    5351        } while (0)
    5452
    55 /** Restores preemption and reschedules if out time slice already elapsed.*/
     53/** Restores preemption but never reschedules. */
    5654#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() \
    6755        do { \
    6856                ASSERT(PREEMPTION_DISABLED); \
     
    7260
    7361
    74 extern void preemption_enabled_scheduler(void);
    75 extern void preemption_set_needed(void);
    76 extern void preemption_clear_needed(void);
    77 
    7862#endif
    7963
Note: See TracChangeset for help on using the changeset viewer.