projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doc review; fix some quirks.
[bertos.git]
/
kern
/
signal.c
diff --git
a/kern/signal.c
b/kern/signal.c
index 6194251702a0d4eb3dabb1c67ee5e7d434708b8a..31cf3b7e2ca24b42db71f2ebd7bc7832d0a1ee7c 100644
(file)
--- a/
kern/signal.c
+++ b/
kern/signal.c
@@
-119,7
+119,7
@@
sigmask_t sig_check(sigmask_t sigs)
/**
* Sleep until any of the signals in \a sigs occurs.
/**
* Sleep until any of the signals in \a sigs occurs.
- * \return the signal(s) that have aw
aked
the process.
+ * \return the signal(s) that have aw
oken
the process.
*/
sigmask_t sig_wait(sigmask_t sigs)
{
*/
sigmask_t sig_wait(sigmask_t sigs)
{
@@
-150,8
+150,8
@@
sigmask_t sig_wait(sigmask_t sigs)
/**
* Sleep until any of the signals in \a sigs or \a timeout ticks elapse.
* If the timeout elapse a SIG_TIMEOUT is added to the received signal(s).
/**
* Sleep until any of the signals in \a sigs or \a timeout ticks elapse.
* If the timeout elapse a SIG_TIMEOUT is added to the received signal(s).
- * \return the signal(s) that have aw
aked
the process.
- * \note Caller must check return value to check which signal
has awaked
the process.
+ * \return the signal(s) that have aw
oken
the process.
+ * \note Caller must check return value to check which signal
awoke
the process.
*/
sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
{
*/
sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
{
@@
-162,7
+162,7
@@
sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
ASSERT(!sig_check(SIG_TIMEOUT));
ASSERT(!(sigs & SIG_TIMEOUT));
/* IRQ are needed to run timer */
ASSERT(!sig_check(SIG_TIMEOUT));
ASSERT(!(sigs & SIG_TIMEOUT));
/* IRQ are needed to run timer */
- ASSERT(IRQ_ENABLED);
+ ASSERT(IRQ_ENABLED
()
);
timer_set_event_signal(&t, proc_current(), SIG_TIMEOUT);
timer_setDelay(&t, timeout);
timer_set_event_signal(&t, proc_current(), SIG_TIMEOUT);
timer_setDelay(&t, timeout);
@@
-174,12
+174,13
@@
sigmask_t sig_waitTimeout(sigmask_t sigs, ticks_t timeout)
if (!(res & SIG_TIMEOUT) && !sig_check(SIG_TIMEOUT))
timer_abort(&t);
IRQ_RESTORE(flags);
if (!(res & SIG_TIMEOUT) && !sig_check(SIG_TIMEOUT))
timer_abort(&t);
IRQ_RESTORE(flags);
+ return res;
}
/**
* Send the signals \a sigs to the process \a proc.
}
/**
* Send the signals \a sigs to the process \a proc.
- * The process will be aw
a
ken if it was waiting for any of them.
+ * The process will be aw
o
ken if it was waiting for any of them.
*
* \note This call is interrupt safe.
*/
*
* \note This call is interrupt safe.
*/
@@
-191,7
+192,7
@@
void sig_signal(Process *proc, sigmask_t sigs)
/* Set the signals */
proc->sig_recv |= sigs;
/* Set the signals */
proc->sig_recv |= sigs;
- /* Check if process needs to be aw
a
ken */
+ /* Check if process needs to be aw
o
ken */
if (proc->sig_recv & proc->sig_wait)
{
/* Wake up process and enqueue in ready list */
if (proc->sig_recv & proc->sig_wait)
{
/* Wake up process and enqueue in ready list */