diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-14 19:22:32 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-14 19:22:32 +0000 |
commit | cc3614dfe8f67033dca8c7c1f40c3367a0d3ca06 (patch) | |
tree | 45a3ce8d73b15e96d13ef6a48171a61a1a8449b8 /nuttx/sched | |
parent | 930f9a13511a6d9bc2e44fadef42f6345d921667 (diff) | |
download | px4-firmware-cc3614dfe8f67033dca8c7c1f40c3367a0d3ca06.tar.gz px4-firmware-cc3614dfe8f67033dca8c7c1f40c3367a0d3ca06.tar.bz2 px4-firmware-cc3614dfe8f67033dca8c7c1f40c3367a0d3ca06.zip |
Finish dup logic for open files; fix bug in sigtimedwait(), would return wrong signo value if the signal was already pending
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5517 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/mq_initialize.c | 4 | ||||
-rw-r--r-- | nuttx/sched/sig_timedwait.c | 2 | ||||
-rw-r--r-- | nuttx/sched/task_vfork.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/sched/mq_initialize.c b/nuttx/sched/mq_initialize.c index 5b03a1120..dd7c7ed0f 100644 --- a/nuttx/sched/mq_initialize.c +++ b/nuttx/sched/mq_initialize.c @@ -217,11 +217,11 @@ void mq_initialize(void) void mq_desblockalloc(void) { - struct mq_des_block_s *mqdesblock; + FAR struct mq_des_block_s *mqdesblock; /* Allocate a block of message descriptors */ - mqdesblock = (struct mq_des_block_s *)kmalloc(sizeof(struct mq_des_block_s)); + mqdesblock = (FAR struct mq_des_block_s *)kmalloc(sizeof(struct mq_des_block_s)); if (mqdesblock) { int i; diff --git a/nuttx/sched/sig_timedwait.c b/nuttx/sched/sig_timedwait.c index b07b8f2a1..f8c619b21 100644 --- a/nuttx/sched/sig_timedwait.c +++ b/nuttx/sched/sig_timedwait.c @@ -228,7 +228,7 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, /* The return value is the number of the signal that awakened us */ - ret = info->si_signo; + ret = sigpend->info.si_signo; } /* We will have to wait for a signal to be posted to this task. */ diff --git a/nuttx/sched/task_vfork.c b/nuttx/sched/task_vfork.c index 0ea09b048..4b42c7b36 100644 --- a/nuttx/sched/task_vfork.c +++ b/nuttx/sched/task_vfork.c @@ -291,7 +291,7 @@ pid_t task_vforkstart(FAR _TCB *child) * still running. */ - while ((ret = kill(pid, 0)) == OK) + while (kill(pid, 0) == OK) { /* Yes.. then we can yield to it -- assuming that it has not lowered * its priority. sleep(0) might be a safer thing to do since it does |