projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a better name.
[bertos.git]
/
bertos
/
kern
/
proc.h
diff --git
a/bertos/kern/proc.h
b/bertos/kern/proc.h
index 4be0b25eb8821a5361a7526a4ed2f3c6cc77fc41..db269398ab8462aa54c8ee515ad6e1b22d81ab64 100644
(file)
--- a/
bertos/kern/proc.h
+++ b/
bertos/kern/proc.h
@@
-281,7
+281,7
@@
INLINE void proc_permit(void)
* \note This accessor is needed because _preempt_forbid_cnt
* must be absoultely private.
*/
* \note This accessor is needed because _preempt_forbid_cnt
* must be absoultely private.
*/
-INLINE bool proc_
a
llowed(void)
+INLINE bool proc_
preemptA
llowed(void)
{
#if CONFIG_KERN_PREEMPT
extern cpu_atomic_t _preempt_forbid_cnt;
{
#if CONFIG_KERN_PREEMPT
extern cpu_atomic_t _preempt_forbid_cnt;
@@
-291,6
+291,9
@@
INLINE bool proc_allowed(void)
#endif
}
#endif
}
+/** Deprecated, use the proc_preemptAllowed() macro. */
+#define proc_allowed() proc_preemptAllowed()
+
/**
* Execute a block of \a CODE atomically with respect to task scheduling.
*/
/**
* Execute a block of \a CODE atomically with respect to task scheduling.
*/
@@
-348,7
+351,7
@@
INLINE bool proc_allowed(void)
*/
#define PROC_DEFINE_STACK(name, size) \
STATIC_ASSERT((size) >= KERN_MINSTACKSIZE); \
*/
#define PROC_DEFINE_STACK(name, size) \
STATIC_ASSERT((size) >= KERN_MINSTACKSIZE); \
- cpu_stack_t name[(
size
) / sizeof(cpu_stack_t)];
+ cpu_stack_t name[(
(size) + sizeof(cpu_stack_t) - 1
) / sizeof(cpu_stack_t)];
/* Memory fill codes to help debugging */
#if CONFIG_KERN_MONITOR
/* Memory fill codes to help debugging */
#if CONFIG_KERN_MONITOR