mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-05 19:01:54 +00:00
Updated id handling for mutex and signal, sleep() for thread.
This commit is contained in:
@@ -23,13 +23,20 @@ namespace sta
|
||||
/**
|
||||
* @param handle CMSIS RTOS2 mutex
|
||||
*/
|
||||
RtosMutex(osMutexId_t * handle);
|
||||
RtosMutex(osMutexId_t handle);
|
||||
|
||||
/**
|
||||
* @brief Construct a new Rtos Mutex object
|
||||
*
|
||||
* @param name The name of the mutex.
|
||||
*/
|
||||
RtosMutex(const char* name);
|
||||
|
||||
void acquire() override;
|
||||
void release() override;
|
||||
|
||||
private:
|
||||
osMutexId_t * handle_; /**< CMSIS RTOS2 mutex */
|
||||
osMutexId_t handle_; /**< CMSIS RTOS2 mutex */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
@@ -23,7 +23,7 @@ namespace sta
|
||||
/**
|
||||
* @param semaphore CMSIS RTOS2 semaphore
|
||||
*/
|
||||
RtosSignal(osSemaphoreId_t * semaphore);
|
||||
RtosSignal(osSemaphoreId_t semaphore);
|
||||
|
||||
void notify() override;
|
||||
bool peek() override;
|
||||
@@ -31,7 +31,7 @@ namespace sta
|
||||
void wait() override;
|
||||
|
||||
private:
|
||||
osSemaphoreId_t * semaphore_; /**< CMSIS RTOS2 semaphore */
|
||||
osSemaphoreId_t semaphore_; /**< CMSIS RTOS2 semaphore */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
@@ -74,6 +74,14 @@ namespace sta
|
||||
*/
|
||||
RtosThread(const Handle & handle);
|
||||
|
||||
/**
|
||||
* @brief Sets the thread to BLOCKED for a given number of ticks.
|
||||
* Other threads can run in the meantime.
|
||||
*
|
||||
* @param ticks The number of ticks before setting the thread to READY again.
|
||||
*/
|
||||
void sleep(uint32_t ticks);
|
||||
|
||||
/**
|
||||
* @brief Send user notification flags to thread.
|
||||
*
|
||||
|
Reference in New Issue
Block a user