diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-10 14:42:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-10 14:42:30 +0000 |
commit | 4150a6cc39852cfe651471821eb9f1e23f1d3af2 (patch) | |
tree | 4b1c21e5f981c4220ad792e3b28388b624445142 /nuttx/sched | |
parent | 45b002bb5758b99e1db1291171ef7106d29b7424 (diff) | |
download | px4-nuttx-4150a6cc39852cfe651471821eb9f1e23f1d3af2.tar.gz px4-nuttx-4150a6cc39852cfe651471821eb9f1e23f1d3af2.tar.bz2 px4-nuttx-4150a6cc39852cfe651471821eb9f1e23f1d3af2.zip |
Add to nsh, add limits.h, gets, strtok, strtok_r
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@54 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/sem_trywait.c | 7 | ||||
-rw-r--r-- | nuttx/sched/sem_wait.c | 7 |
2 files changed, 3 insertions, 11 deletions
diff --git a/nuttx/sched/sem_trywait.c b/nuttx/sched/sem_trywait.c index dc65f8f58..e634e1781 100644 --- a/nuttx/sched/sem_trywait.c +++ b/nuttx/sched/sem_trywait.c @@ -102,12 +102,9 @@ int sem_trywait(sem_t *sem) irqstate_t saved_state; int ret = ERROR; - if (up_interrupt_context()) - { - /* We do not want to set the errno in this case */ + /* This API should not be called from interrupt handlers */ - return ERROR; - } + DEBUGASSERT(!up_interrupt_context()) /* Assume any errors reported are due to invalid arguments. */ diff --git a/nuttx/sched/sem_wait.c b/nuttx/sched/sem_wait.c index 4d82dd41a..8734dc1f7 100644 --- a/nuttx/sched/sem_wait.c +++ b/nuttx/sched/sem_wait.c @@ -105,12 +105,7 @@ int sem_wait(sem_t *sem) /* This API should not be called from interrupt handlers */ - if (up_interrupt_context()) - { - /* We do not want to set the errno in this case */ - - return ERROR; - } + DEBUGASSERT(!up_interrupt_context()) /* Assume any errors reported are due to invalid arguments. */ |