28 #ifndef IOT_THREADS_H_ 29 #define IOT_THREADS_H_ 32 #include "iot_config.h" 247 uint32_t initialValue,
338 uint32_t timeoutMs );
bool Iot_CreateDetachedThread(IotThreadRoutine_t threadRoutine, void *pArgument, int32_t priority, size_t stackSize)
Create a new detached thread, i.e. a thread that cleans up after itself.
bool IotMutex_Create(IotMutex_t *pNewMutex, bool recursive)
Create a new mutex.
void IotSemaphore_Post(IotSemaphore_t *pSemaphore)
Post to (unlock) a semaphore. This function should only return when the semaphore post succeeds; it i...
void IotSemaphore_Destroy(IotSemaphore_t *pSemaphore)
Free resources used by a semaphore.
bool IotSemaphore_Create(IotSemaphore_t *pNewSemaphore, uint32_t initialValue, uint32_t maxValue)
Create a new counting semaphore.
uint32_t IotSemaphore_GetCount(IotSemaphore_t *pSemaphore)
Query the current count of the semaphore.
bool IotSemaphore_TimedWait(IotSemaphore_t *pSemaphore, uint32_t timeoutMs)
Attempt to wait on (lock) a semaphore with a timeout.
bool IotMutex_TryLock(IotMutex_t *pMutex)
Attempt to lock a mutex. Return immediately if the mutex is not available.
void IotMutex_Lock(IotMutex_t *pMutex)
Lock a mutex. This function should only return when the mutex is locked; it is not expected to fail...
void IotMutex_Unlock(IotMutex_t *pMutex)
Unlock a mutex. This function should only return when the mutex is unlocked; it is not expected to fa...
void IotSemaphore_Wait(IotSemaphore_t *pSemaphore)
Wait on (lock) a semaphore. This function should only return when the semaphore wait succeeds; it is ...
void IotMutex_Destroy(IotMutex_t *pMutex)
Free resources used by a mutex.
bool IotSemaphore_TryWait(IotSemaphore_t *pSemaphore)
Attempt to wait on (lock) a semaphore. Return immediately if the semaphore is not available...