ApraLinuxUtils 1.0.0
C++ utility library for embedded Linux systems
 
Loading...
Searching...
No Matches
Mutex.cpp
Go to the documentation of this file.
1/*
2 * Mutex.cpp
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#include "utils/Mutex.h"
13
14namespace apra
15{
16
18{
19 pthread_mutex_init(&m_mutex, NULL);
20}
22{
23 pthread_mutex_destroy(&m_mutex);
24}
26{
27 pthread_mutex_lock(&m_mutex);
28}
30{
31 pthread_mutex_unlock(&m_mutex);
32}
33pthread_mutex_t& Mutex::get()
34{
35 return m_mutex;
36}
37} /* namespace apra */
38
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