1 #ifndef __LUNAIX_KPREEMPT_H
2 #define __LUNAIX_KPREEMPT_H
6 #include <lunaix/process.h>
11 cpu_enable_interrupt();
17 cpu_disable_interrupt();
23 current_thread->stats.last_reentry = clock_systime();
30 * @brief preempt the current thread, and yield the remaining
31 * time slice to other threads.
33 * The current thread is marked as if it is being
34 * preempted involuntarily by kernel.
41 thread_stats_update_kpreempt();
46 * @brief yield the remaining time slice to other threads.
48 * The current thread is marked as if it is being
49 * preempted voluntarily by itself.
60 preempt_check_stalled(struct thread* th);
62 #endif /* __LUNAIX_KPREEMPT_H */