ApraLinuxUtils 1.0.0
C++ utility library for embedded Linux systems
 
Loading...
Searching...
No Matches
Mutex.h
Go to the documentation of this file.
1/*
2 * Mutex.h
3 *
4 * Copyright (c) 2024 Apra Labs
5 *
6 * This file is part of ApraUtils.
7 *
8 * Licensed under the MIT License.
9 * See LICENSE file in the project root for full license information.
10 */
11
12#ifndef SRC_APRA_UTILS_MUTEX_H_
13#define SRC_APRA_UTILS_MUTEX_H_
14#include <pthread.h>
15
16namespace apra
17{
18class Mutex
19{
20public:
21 friend class ScopeLock;
22 Mutex();
23 ~Mutex();
24 void lock();
25 void unlock();
26protected:
27 pthread_mutex_t& get();
28 pthread_mutex_t m_mutex;
29};
30} /* namespace apra */
31
32#endif /* SRC_APRA_UTILS_MUTEX_H_ */
pthread_mutex_t & get()
Definition Mutex.cpp:33
pthread_mutex_t m_mutex
Definition Mutex.h:28
void lock()
Definition Mutex.cpp:25
void unlock()
Definition Mutex.cpp:29