2016-12-17 04:11:05 +08:00
|
|
|
#ifndef __LINUX_PREEMPT_H
|
|
|
|
|
#define __LINUX_PREEMPT_H
|
|
|
|
|
|
2016-12-15 07:08:02 +08:00
|
|
|
extern int preempt_count;
|
2016-03-18 05:21:45 +08:00
|
|
|
|
2016-12-15 07:08:02 +08:00
|
|
|
#define preempt_disable() uatomic_inc(&preempt_count)
|
|
|
|
|
#define preempt_enable() uatomic_dec(&preempt_count)
|
2016-12-17 04:11:05 +08:00
|
|
|
|
|
|
|
|
static inline int in_interrupt(void)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* __LINUX_PREEMPT_H */
|