geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
SharedMemoryScopedLock.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef SHAREDMEMORYSCOPEDLOCK_HPP_INCLUDE
7 #define SHAREDMEMORYSCOPEDLOCK_HPP_INCLUDE
8 
9 #include <pthread.h>
10 
11 #include "geopm_public.h"
12 
13 namespace geopm
14 {
18  {
19  public:
21  SharedMemoryScopedLock(pthread_mutex_t *mutex);
24  virtual ~SharedMemoryScopedLock();
25  private:
26  pthread_mutex_t *m_mutex;
27  };
28 }
29 
30 #endif
An object used to automatically hold a SharedMemory mutex while in scope, and release it when out of ...
Definition: SharedMemoryScopedLock.hpp:18
SharedMemoryScopedLock(const SharedMemoryScopedLock &other)=delete
SharedMemoryScopedLock & operator=(const SharedMemoryScopedLock &other)=delete
#define GEOPM_PUBLIC
Definition: geopm_public.h:10
Definition: Agg.cpp:20