projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include proper header.
[bertos.git]
/
bertos
/
kern
/
proc.h
diff --git
a/bertos/kern/proc.h
b/bertos/kern/proc.h
index 6f1a8af5be69c463a860e760fcebb53f31b835fb..f8de758ffeec511879400f20d750311d3b3c992b 100644
(file)
--- a/
bertos/kern/proc.h
+++ b/
bertos/kern/proc.h
@@
-46,6
+46,7
@@
#endif
#include <cpu/types.h> // cpustack_t
#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
/*
* Forward declaration. The definition of struct Process is private to the
@@
-84,6
+85,9
@@
const char *proc_currentName(void);
}
#endif
}
#endif
+/** Global preemption disable nesting counter. */
+extern int preempt_forbid_cnt;
+
/**
* Disable preemptive task switching.
*
/**
* Disable preemptive task switching.
*
@@
-105,7
+109,6
@@
INLINE void proc_forbid(void)
{
#if CONFIG_KERN_PREEMPT
// No need to protect against interrupts here.
{
#if CONFIG_KERN_PREEMPT
// No need to protect against interrupts here.
- extern int preempt_forbid_cnt;
++preempt_forbid_cnt;
/*
++preempt_forbid_cnt;
/*
@@
-132,7
+135,6
@@
INLINE void proc_permit(void)
MEMORY_BARRIER;
/* No need to protect against interrupts here. */
MEMORY_BARRIER;
/* No need to protect against interrupts here. */
- extern int preempt_forbid_cnt;
--preempt_forbid_cnt;
ASSERT(preempt_forbid_cnt >= 0);
--preempt_forbid_cnt;
ASSERT(preempt_forbid_cnt >= 0);
@@
-145,7
+147,6
@@
INLINE void proc_permit(void)
#endif
}
#endif
}
-
/**
* Execute a block of \a CODE atomically with respect to task scheduling.
*/
/**
* Execute a block of \a CODE atomically with respect to task scheduling.
*/