projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove redundant prototypes; reformat.
[bertos.git]
/
bertos
/
kern
/
proc.h
diff --git
a/bertos/kern/proc.h
b/bertos/kern/proc.h
index 8a18bf7447c8fcc623cddefccfb89734ea82c704..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
@@
-65,7
+66,6
@@
struct Process *proc_new_with_name(const char* name, void (*entry)(void), iptr_t
void proc_exit(void);
void proc_yield(void);
void proc_exit(void);
void proc_yield(void);
-#define proc_switch proc_yield /* OBSOLETE */
int proc_testSetup(void);
int proc_testRun(void);
int proc_testSetup(void);
int proc_testRun(void);
@@
-78,9
+78,16
@@
const char *proc_name(struct Process *proc);
const char *proc_currentName(void);
#if CONFIG_KERN_PRI
const char *proc_currentName(void);
#if CONFIG_KERN_PRI
-void proc_setPri(struct Process *proc, int pri);
+ void proc_setPri(struct Process *proc, int pri);
+#else
+ INLINE void proc_setPri(UNUSED_ARG(struct Process *,proc), UNUSED_ARG(int, pri))
+ {
+ }
#endif
#endif
+/** Global preemption disable nesting counter. */
+extern int preempt_forbid_cnt;
+
/**
* Disable preemptive task switching.
*
/**
* Disable preemptive task switching.
*
@@
-102,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;
/*
@@
-129,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);
@@
-142,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.
*/
@@
-184,8
+188,6
@@
INLINE void proc_permit(void)
#endif
#endif
#endif
#endif
-#define CONFIG_PROC_DEFSTACKSIZE CONFIG_KERN_MINSTACKSIZE // OBSOLETE
-
/* Memory fill codes to help debugging */
#if CONFIG_KERN_MONITOR
#include <cpu/types.h>
/* Memory fill codes to help debugging */
#if CONFIG_KERN_MONITOR
#include <cpu/types.h>