projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the CPU select page
[bertos.git]
/
bertos
/
kern
/
signal.c
diff --git
a/bertos/kern/signal.c
b/bertos/kern/signal.c
index 3e882cef168775f53367cf0561195bdfd9587495..a22249429d885ed5dd62119773e3dd94e79c2fff 100644
(file)
--- a/
bertos/kern/signal.c
+++ b/
bertos/kern/signal.c
@@
-102,6
+102,7
@@
#include <cfg/cfg_timer.h>
#include <cfg/debug.h>
#include <cfg/cfg_timer.h>
#include <cfg/debug.h>
+
#include <cpu/irq.h>
#include <kern/proc.h>
#include <kern/proc_p.h>
#include <cpu/irq.h>
#include <kern/proc.h>
#include <kern/proc_p.h>
@@
-117,7
+118,7
@@
sigmask_t sig_check(sigmask_t sigs)
{
sigmask_t result;
sigmask_t sig_check(sigmask_t sigs)
{
sigmask_t result;
- cpuflags_t flags;
+ cpu
_
flags_t flags;
IRQ_SAVE_DISABLE(flags);
result = CurrentProcess->sig_recv & sigs;
IRQ_SAVE_DISABLE(flags);
result = CurrentProcess->sig_recv & sigs;
@@
-135,12
+136,11
@@
sigmask_t sig_check(sigmask_t sigs)
sigmask_t sig_wait(sigmask_t sigs)
{
sigmask_t result;
sigmask_t sig_wait(sigmask_t sigs)
{
sigmask_t result;
- cpuflags_t flags;
- extern int preempt_forbid_cnt;
+ cpu_flags_t flags;
/* Sleeping with IRQs disabled or preemption forbidden is illegal */
IRQ_ASSERT_ENABLED();
/* Sleeping with IRQs disabled or preemption forbidden is illegal */
IRQ_ASSERT_ENABLED();
- ASSERT(pr
eempt_forbid_cnt == 0
);
+ ASSERT(pr
oc_allowed()
);
/*
* This is subtle: there's a race condition where a concurrent
/*
* This is subtle: there's a race condition where a concurrent
@@
-164,13
+164,13
@@
sigmask_t sig_wait(sigmask_t sigs)
CurrentProcess->sig_wait = sigs;
/*
CurrentProcess->sig_wait = sigs;
/*
- * Go to sleep and proc_s
chedule()
another process.
+ * Go to sleep and proc_s
witch() to
another process.
*
*
- * We re-enable IRQs because proc_s
chedule
() does not
+ * We re-enable IRQs because proc_s
witch
() does not
* guarantee to save and restore the interrupt mask.
*/
IRQ_RESTORE(flags);
* guarantee to save and restore the interrupt mask.
*/
IRQ_RESTORE(flags);
- proc_s
chedule
();
+ proc_s
witch
();
IRQ_SAVE_DISABLE(flags);
/*
IRQ_SAVE_DISABLE(flags);
/*
@@
-203,7
+203,7
@@
sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
{
Timer t;
sigmask_t res;
{
Timer t;
sigmask_t res;
- cpuflags_t flags;
+ cpu
_
flags_t flags;
ASSERT(!sig_check(SIG_TIMEOUT));
ASSERT(!(sigs & SIG_TIMEOUT));
ASSERT(!sig_check(SIG_TIMEOUT));
ASSERT(!(sigs & SIG_TIMEOUT));
@@
-234,7
+234,7
@@
sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
*/
void sig_signal(Process *proc, sigmask_t sigs)
{
*/
void sig_signal(Process *proc, sigmask_t sigs)
{
- cpuflags_t flags;
+ cpu
_
flags_t flags;
/* See comment in sig_wait() for why this protection is necessary */
IRQ_SAVE_DISABLE(flags);
/* See comment in sig_wait() for why this protection is necessary */
IRQ_SAVE_DISABLE(flags);