diff --git a/configs/sam4e-ek/nsh/defconfig b/configs/sam4e-ek/nsh/defconfig index 22c2c0b7f7..27957e76b7 100644 --- a/configs/sam4e-ek/nsh/defconfig +++ b/configs/sam4e-ek/nsh/defconfig @@ -389,7 +389,7 @@ CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 +CONFIG_PREALLOC_WDOGS=32 CONFIG_PREALLOC_TIMERS=4 # diff --git a/sched/nanosleep.c b/sched/nanosleep.c index c63ccf22fe..4dc76de568 100644 --- a/sched/nanosleep.c +++ b/sched/nanosleep.c @@ -172,11 +172,12 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) if (errval == EAGAIN) { /* The timeout "error" is the normal, successful result */ + irqrestore(flags); return OK; } - /* If we get there, the wait has fail because we were awakened by a + /* If we get there, the wait has failed because we were awakened by a * signal. Return the amount of "unwaited" time if rmtp is non-NULL. */ diff --git a/sched/sig_timedwait.c b/sched/sig_timedwait.c index ed523fe37e..f71e65961a 100644 --- a/sched/sig_timedwait.c +++ b/sched/sig_timedwait.c @@ -150,7 +150,7 @@ static void sig_timeout(int argc, uint32_t itcb) * SI_USER - Signal sent from kill, raise, or abort * SI_QUEUE - Signal sent from sigqueue * SI_TIMER - Signal is result of timer expiration - * SI_ASYNCIO - Signal is the result of asynch IO completion + * SI_ASYNCIO - Signal is the result of asynch IO completion * SI_MESGQ - Signal generated by arrival of a message on an * empty message queue. * @@ -262,7 +262,7 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, rtcb->waitdog = wd_create(); if (rtcb->waitdog) { - /* This little of nonsense is necessary for some + /* This little bit of nonsense is necessary for some * processors where sizeof(pointer) < sizeof(uint32_t). * see wdog.h. */ @@ -272,7 +272,8 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, /* Start the watchdog */ - wd_start(rtcb->waitdog, waitticks, (wdentry_t)sig_timeout, 1, wdparm.dwarg); + wd_start(rtcb->waitdog, waitticks, (wdentry_t)sig_timeout, 1, + wdparm.dwarg); /* Now wait for either the signal or the watchdog */ @@ -311,7 +312,7 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, /* We were awakened by a signal... but is it one of the signals that * we were waiting for? */ - + if (sigismember(set, rtcb->sigunbinfo.si_signo)) { /* Yes.. the return value is the number of the signal that @@ -338,7 +339,7 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, set_errno(EAGAIN); ret = ERROR; } - + /* Return the signal info to the caller if so requested */ if (info)