mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-02 16:51:53 +00:00
Added working blocking-wrapper
This commit is contained in:
parent
14142d5b62
commit
cc74b9edd4
@ -137,7 +137,14 @@ namespace sta
|
||||
virtual void cleanup();
|
||||
|
||||
#ifdef STA_TACOS_WATCHDOG_ENABLED
|
||||
#define BLOCKING(stmt) waiting(); stmt heartbeat()
|
||||
/**
|
||||
* @brief This macro wraps a given statement into waiting() and heartbeat() to make the code more readable.
|
||||
*
|
||||
*/
|
||||
#define blocking(...) \
|
||||
waiting(); \
|
||||
__VA_ARGS__ \
|
||||
heartbeat(); \
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ namespace sta
|
||||
attribs_{ .name=name, .cb_size=cb_size, .stack_size=stack_size, .priority=prio },
|
||||
running_{false},
|
||||
#ifdef STA_TACOS_WATCHDOG_ENABLED
|
||||
status_{ThreadStatus::STOPPED}
|
||||
, status_{ThreadStatus::STOPPED}
|
||||
#endif // STA_TACOS_WATCHDOG_ENABLED
|
||||
{
|
||||
STA_ASSERT(stack_size >= 0);
|
||||
@ -36,9 +36,9 @@ namespace sta
|
||||
: RtosThread(RtosHandle<osThreadId_t>(Handle::Deferred(&instance_))),
|
||||
instance_{ NULL },
|
||||
attribs_{ },
|
||||
running_{false},
|
||||
running_{false}
|
||||
#ifdef STA_TACOS_WATCHDOG_ENABLED
|
||||
status_{ThreadStatus::STOPPED}
|
||||
, status_{ThreadStatus::STOPPED}
|
||||
#endif // STA_TACOS_WATCHDOG_ENABLED
|
||||
{}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user