#include "sched/sched.h"
#include "semaphore/semaphore.h"
-#if defined(CONFIG_TINYARA_DEBUG) && defined(CONFIG_SEMAPHORE_HISTORY)
-#include <tinyara/debug/tinyara_debug.h>
-#endif
-
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
sem->semcount--;
sem_addholder(sem);
rtcb->waitsem = NULL;
-#if defined(CONFIG_TINYARA_DEBUG) && defined(CONFIG_SEMAPHORE_HISTORY)
- save_semaphore_history(sem, (void *)rtcb, SEM_AQUIRE);
-#endif
+
ret = OK;
}
rtcb->waitsem = sem;
-#if defined(CONFIG_TINYARA_DEBUG) && defined(CONFIG_SEMAPHORE_HISTORY)
- save_semaphore_history(sem, (void *)rtcb, SEM_WAITING);
-#endif
-
/* If priority inheritance is enabled, then check the priority of
* the holder of the semaphore.
*/
sem->semcount--;
rtcb->waitsem = NULL;
-#if defined(CONFIG_TINYARA_DEBUG) && defined(CONFIG_SEMAPHORE_HISTORY)
- save_semaphore_history(sem, (void *)rtcb, SEM_AQUIRE);
-#endif
+
ret = OK;
}
rtcb->waitsem = sem;
-#if defined(CONFIG_TINYARA_DEBUG) && defined(CONFIG_SEMAPHORE_HISTORY)
- save_semaphore_history(sem, (void *)rtcb, SEM_WAITING);
-#endif
/* Add the TCB to the prioritized semaphore wait queue */
+
set_errno(0);
up_block_task(rtcb, TSTATE_WAIT_SEM);