Simplified XF 1.1.0

mutex.h
1#ifndef XF_INTERFACE_MUTEX_H
2#define XF_INTERFACE_MUTEX_H
3
4#include <stdint.h>
5
6 namespace interface {
7
17 class XFMutex
18{
19 public:
20 virtual ~XFMutex() = default;
21
22 virtual void lock() = 0;
23 virtual void unlock() = 0;
24
32 virtual bool tryLock(int32_t timeout = 0) = 0;
33
49 static XFMutex * create();
50
51 protected:
52 XFMutex() = default;
53};
54
55} // namespace interface
56#endif // XF_INTERFACE_MUTEX_H
interface::XFMutex
Mutex interface needed by the XF to access a mutex.
Definition: mutex.h:18
interface::XFMutex::unlock
virtual void unlock()=0
Releases the mutex so it can be taken by other threads.
interface::XFMutex::lock
virtual void lock()=0
Blocks until the mutex becomes available.
interface::XFMutex::create
static XFMutex * create()
Creates and returns a new mutex instance.
Definition: mutex.cpp:11
interface::XFMutex::tryLock
virtual bool tryLock(int32_t timeout=0)=0
Tries to get the mutex.