preempt.h

Go to the documentation of this file.
00001 
00038 #ifndef KERN_PREEMPT_H
00039 #define KERN_PREEMPT_H
00040 
00041 #include <cfg/compiler.h>
00042 
00043 #if CONFIG_KERN_PREEMPT
00044     INLINE void proc_decQuantum(void)
00045     {
00046         extern int _proc_quantum;
00047         if (_proc_quantum > 0)
00048             _proc_quantum--;
00049     }
00050 #else /* !CONFIG_KERN_PREEMPT */
00051     #define proc_decQuantum() /* NOP */
00052 #endif /* CONFIG_KERN_PREEMPT */
00053 
00054 #endif /* KERN_PREEMPT_H */