X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/270869139db617e29a35bb9ded41087bb702f9ac..34f6af4f61e0eec9c96113e07f140b609b4113c8:/lunaix-os/includes/lunaix/kpreempt.h?ds=inline diff --git a/lunaix-os/includes/lunaix/kpreempt.h b/lunaix-os/includes/lunaix/kpreempt.h index 400aaff..6fa9d70 100644 --- a/lunaix-os/includes/lunaix/kpreempt.h +++ b/lunaix-os/includes/lunaix/kpreempt.h @@ -1,23 +1,10 @@ #ifndef __LUNAIX_KPREEMPT_H #define __LUNAIX_KPREEMPT_H -#include -#include +#include +#include #include -#define _preemptible \ - __attribute__((section(".kf.preempt"))) no_inline - -#define ensure_preempt_caller() \ - do { \ - extern int __kf_preempt_start[]; \ - extern int __kf_preempt_end[]; \ - ptr_t _retaddr = abi_get_retaddr(); \ - assert_msg((ptr_t)__kf_preempt_start <= _retaddr \ - && _retaddr < (ptr_t)__kf_preempt_end, \ - "caller must be kernel preemptible"); \ - } while(0) - static inline void set_preemption() {