summaryrefslogtreecommitdiff
path: root/nuttx/sched/sem_trywait.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-10 14:42:30 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-10 14:42:30 +0000
commit4150a6cc39852cfe651471821eb9f1e23f1d3af2 (patch)
tree4b1c21e5f981c4220ad792e3b28388b624445142 /nuttx/sched/sem_trywait.c
parent45b002bb5758b99e1db1291171ef7106d29b7424 (diff)
downloadpx4-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/sem_trywait.c')
-rw-r--r--nuttx/sched/sem_trywait.c7
1 files changed, 2 insertions, 5 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. */