summaryrefslogtreecommitdiff
path: root/nuttx/sched/sig_received.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-28 14:48:42 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-28 14:48:42 +0000
commit151a39425178ee628c924b8231ca65e24ee386d7 (patch)
treec509b82d096f72a52b58c51d7cca13d20ef818bb /nuttx/sched/sig_received.c
parent02ca18a9e0cd6c8a31f501dcd05cef13caa5a911 (diff)
downloadpx4-nuttx-151a39425178ee628c924b8231ca65e24ee386d7.tar.gz
px4-nuttx-151a39425178ee628c924b8231ca65e24ee386d7.tar.bz2
px4-nuttx-151a39425178ee628c924b8231ca65e24ee386d7.zip
mq_receive/send: Return appropriate errnos and stop waiting if signal received.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@164 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sig_received.c')
-rw-r--r--nuttx/sched/sig_received.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/nuttx/sched/sig_received.c b/nuttx/sched/sig_received.c
index 7a5e2e749..6cdf1dd9f 100644
--- a/nuttx/sched/sig_received.c
+++ b/nuttx/sched/sig_received.c
@@ -47,6 +47,7 @@
#include "os_internal.h"
#include "sem_internal.h"
#include "sig_internal.h"
+#include "mq_internal.h"
/************************************************************
* Definitions
@@ -380,7 +381,13 @@ int sig_received(FAR _TCB *stcb, siginfo_t *info)
* task must be unblocked when a signal is received.
*/
- /* NOT YET IMPLEMENTED. */
+#ifndef CONFIG_DISABLE_MQUEUE
+ if (stcb->task_state == TSTATE_WAIT_MQNOTEMPTY ||
+ stcb->task_state == TSTATE_WAIT_MQNOTFULL)
+ {
+ mq_waitirq(stcb);
+ }
+#endif
}
return ret;