#endif
#include <cpu/types.h> // cpustack_t
+#include <cpu/frame.h> // CPU_SAVED_REGS_CNT
/*
* Forward declaration. The definition of struct Process is private to the
}
#endif
+/** Global preemption disable nesting counter. */
+extern int preempt_forbid_cnt;
+
/**
* Disable preemptive task switching.
*
{
#if CONFIG_KERN_PREEMPT
// No need to protect against interrupts here.
- extern int preempt_forbid_cnt;
++preempt_forbid_cnt;
/*
MEMORY_BARRIER;
/* No need to protect against interrupts here. */
- extern int preempt_forbid_cnt;
--preempt_forbid_cnt;
ASSERT(preempt_forbid_cnt >= 0);
#endif
}
-
/**
* Execute a block of \a CODE atomically with respect to task scheduling.
*/