Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions libs/libc/semaphore/sem_timedwait.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
* Included Files
****************************************************************************/

#include <assert.h>

#include <nuttx/semaphore.h>

/****************************************************************************
Expand Down
6 changes: 3 additions & 3 deletions sched/semaphore/sem_tickwait.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@

int nxsem_tickwait(FAR sem_t *sem, uint32_t delay)
{
FAR struct tcb_s *rtcb = this_task();
FAR struct tcb_s *rtcb;
irqstate_t flags;
int ret;

DEBUGASSERT(sem != NULL && up_interrupt_context() == false);

/* We will disable interrupts until we have completed the semaphore
* wait. We need to do this (as opposed to just disabling pre-emption)
* because there could be interrupt handlers that are asynchronously
Expand Down Expand Up @@ -106,6 +104,8 @@ int nxsem_tickwait(FAR sem_t *sem, uint32_t delay)
goto out;
}

rtcb = this_task();

/* Start the watchdog with interrupts still disabled */

wd_start(&rtcb->waitdog, delay, nxsem_timeout, (uintptr_t)rtcb);
Expand Down
Loading