mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-09-29 05:17:33 +00:00
Added mutex timeout and mutex ownership
This commit is contained in:
@@ -9,12 +9,16 @@ namespace sta
|
||||
class DummyMutex : public Mutex
|
||||
{
|
||||
public:
|
||||
void acquire() override {}
|
||||
bool isCurrentThreadOwner()
|
||||
{
|
||||
return true; // Your mutex? It's OUR mutex, comrade!
|
||||
};
|
||||
|
||||
void acquire(uint32_t timeout /* = STA_MUTEX_MAX_TIMEOUT */) override {}
|
||||
void release() override {}
|
||||
};
|
||||
|
||||
static DummyMutex dummyMutex;
|
||||
|
||||
|
||||
Mutex * Mutex::ALWAYS_FREE = &dummyMutex;
|
||||
} // namespace sta
|
||||
|
Reference in New Issue
Block a user