mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/include/xtimer.h: new function xtimer_rmutex_lock_timeout()
This commit is contained in:
parent
6d6b93afdc
commit
67e83c1e3e
@ -37,6 +37,7 @@
|
||||
#endif /* MODULE_CORE_MSG */
|
||||
#include "mutex.h"
|
||||
#include "kernel_types.h"
|
||||
#include "rmutex.h"
|
||||
|
||||
#ifdef MODULE_ZTIMER_XTIMER_COMPAT
|
||||
#include "ztimer/xtimer_compat.h"
|
||||
@ -413,7 +414,19 @@ static inline bool xtimer_less64(xtimer_ticks64_t a, xtimer_ticks64_t b);
|
||||
*/
|
||||
int xtimer_mutex_lock_timeout(mutex_t *mutex, uint64_t us);
|
||||
|
||||
/**
|
||||
* @brief lock a rmutex but with timeout
|
||||
*
|
||||
* @param[in] rmutex rmutex to lock
|
||||
* @param[in] us timeout in microseconds relative
|
||||
*
|
||||
* @return 0, when returned after rmutex was locked
|
||||
* @return -1, when the timeout occcured
|
||||
*/
|
||||
int xtimer_rmutex_lock_timeout(rmutex_t *rmutex, uint64_t us);
|
||||
|
||||
#if defined(MODULE_CORE_THREAD_FLAGS) || defined(DOXYGEN)
|
||||
|
||||
/**
|
||||
* @brief Set timeout thread flag after @p timeout
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user