aboutsummaryrefslogtreecommitdiff
path: root/nuttx/sched/sig_mqnotempty.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-12 19:58:45 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-12 19:58:45 +0000
commitb58281cab8add0af82167282126132b069170dd6 (patch)
tree84c6da5c61268158365bdafe58f546b34a0b8a91 /nuttx/sched/sig_mqnotempty.c
parentdb161f73bc2608dbb8ad8c022609198f7f0b3f95 (diff)
downloadpx4-firmware-b58281cab8add0af82167282126132b069170dd6.tar.gz
px4-firmware-b58281cab8add0af82167282126132b069170dd6.tar.bz2
px4-firmware-b58281cab8add0af82167282126132b069170dd6.zip
Fix a *critical* bug in the task exit logic. Implements SIGCHILD
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5513 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sig_mqnotempty.c')
-rw-r--r--nuttx/sched/sig_mqnotempty.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nuttx/sched/sig_mqnotempty.c b/nuttx/sched/sig_mqnotempty.c
index 9a1fd7243..f7ae6fd0d 100644
--- a/nuttx/sched/sig_mqnotempty.c
+++ b/nuttx/sched/sig_mqnotempty.c
@@ -88,6 +88,9 @@ int sig_mqnotempty (int pid, int signo, union sigval value)
int sig_mqnotempty (int pid, int signo, void *sival_ptr)
#endif
{
+#ifdef CONFIG_SCHED_HAVE_PARENT
+ FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+#endif
FAR _TCB *stcb;
siginfo_t info;
int ret = ERROR;
@@ -113,6 +116,10 @@ int sig_mqnotempty (int pid, int signo, void *sival_ptr)
#else
info.si_value.sival_ptr = sival_ptr;
#endif
+#ifdef CONFIG_SCHED_HAVE_PARENT
+ info.si_pid = rtcb->pid;
+ info.si_status = OK;
+#endif
/* Verify that we can perform the signalling operation */