Mark3 Realtime Kernel
lockguard.h
Go to the documentation of this file.
1 /*===========================================================================
2  _____ _____ _____ _____
3  ___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
4 | \ / | || \ || | || |/ / ||___ |
5 | \/ | || \ || \ || \ ||___ |
6 |__/\__/|__|_||__|\__\ __||__|\__\ __||__|\__\ __||______|
7  |_____| |_____| |_____| |_____|
8 
9 --[Mark3 Realtime Platform]--------------------------------------------------
10 
11 Copyright (c) 2018 m0slevin, all rights reserved.
12 See license.txt for more information
13 ===========================================================================*/
20 #pragma once
21 
22 #include "mark3.h"
23 
24 namespace Mark3
25 {
32 class LockGuard
33 {
34 public:
38  LockGuard(Mutex* pclMutex);
39 
44  LockGuard(Mutex* pclMutex, uint32_t u32TimeoutMs_);
45 
46  ~LockGuard();
47 
54  bool isAcquired() { return m_bIsAcquired; }
55 
56 private:
59 };
60 } // namespace Mark3
Mutex * m_pclMutex
Definition: lockguard.h:58
LockGuard(Mutex *pclMutex)
Definition: lockguard.cpp:25
Definition: atomic.cpp:23
The Mutex Class. Class providing Mutual-exclusion locks, based on BlockingObject. ...
Definition: mutex.h:63
Single include file given to users of the Mark3 Kernel API.
bool m_bIsAcquired
Definition: lockguard.h:57
bool isAcquired()
Definition: lockguard.h:54
The LockGuard class. This class provides RAII locks based on Mark3's kernel Mutex object...
Definition: lockguard.h:32