ApraLinuxUtils 1.0.0
C++ utility library for embedded Linux systems
 
Loading...
Searching...
No Matches
ScopeLock.h
Go to the documentation of this file.
1/*
2 * ScopeLock.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 INCLUDES_APRA_SYNCHRONIZATION_H_
13#define INCLUDES_APRA_SYNCHRONIZATION_H_
14
15#include <pthread.h>
16#include <vector>
17#include <deque>
18#include "utils/Mutex.h"
19
20namespace apra
21{
23{
24public:
25 ScopeLock(pthread_mutex_t &mutex);
26 ScopeLock(Mutex &mutex);
27 ~ScopeLock();
28protected:
29 pthread_mutex_t &m_lock;
30};
31}
32
33#endif /* INCLUDES_APRA_SYNCHRONIZATION_H_ */
pthread_mutex_t & m_lock
Definition ScopeLock.h:29