From 4150a6cc39852cfe651471821eb9f1e23f1d3af2 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 10 Mar 2007 14:42:30 +0000 Subject: 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 --- nuttx/sched/sem_trywait.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nuttx/sched/sem_trywait.c') 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. */ -- cgit v1.2.3