Simplified XF 1.1.0
mutex.h
1#ifndef XF_IDF_STM32_MUTEX_H
2#define XF_IDF_STM32_MUTEX_H
3
4#include <config/xf-config.h>
5
6#if (USE_XF_IDF_STM32_MUTEX_CLASS != 0)
7
8#include <stdint.h>
9#include "xf/interface/mutex.h"
10
23class XFMutex : public interface::XFMutex
24{
25 friend class interface::XFMutex;
26 friend class XFEventQueue;
27public:
28
29 void lock() override;
30 void unlock() override;
31
32 bool tryLock(int32_t timeout = 0) override;
33
34protected:
35 XFMutex() = default;
36};
37 // end of port_idf_stm32 group
39#endif // USE_XF_IDF_STM32_MUTEX_CLASS
40#endif // XF_IDF_STM32_MUTEX_H
Default Qt implementation for the XFEventQueue interface.
Definition: eventqueue.h:22
Default Qt implementation for the XFMutex interface.
Definition: mutex.h:20
void lock() override
Blocks until the mutex becomes available.
XFMutex()=default
Do not allow to directly create an object of this class. Call interface::XFMutex::create() instead.
bool tryLock(int32_t timeout=0) override
Tries to get the mutex.
void unlock() override
Releases the mutex so it can be taken by other threads.
Mutex interface needed by the XF to access a mutex.
Definition: mutex.h:18