Atlas Runtime
log_elision.hpp
Go to the documentation of this file.
1 /*
2  * (c) Copyright 2016 Hewlett Packard Enterprise Development LP
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, either version 3 of the
7  * License, or (at your option) any later version. This program is
8  * distributed in the hope that it will be useful, but WITHOUT ANY
9  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11  * for more details. You should have received a copy of the GNU Lesser
12  * General Public License along with this program. If not, see
13  * <http://www.gnu.org/licenses/>.
14  */
15 
16 
17 #ifndef LOG_ELISION_HPP
18 #define LOG_ELISION_HPP
19 
20 #include <atomic>
21 
22 namespace Atlas {
23 
25 {
26  explicit LockReleaseCount(void *addr, uint64_t count)
27  : LockAddr{addr},
28  Count{count},
29  Next{nullptr} {}
30  LockReleaseCount() = delete;
31  LockReleaseCount(const LockReleaseCount&) = delete;
35 
36  void *LockAddr;
37  std::atomic<uint64_t> Count;
39 };
40 
41 } // namespace Atlas
42 
43 #endif
std::atomic< uint64_t > Count
Definition: log_elision.hpp:37
LockReleaseCount * Next
Definition: log_elision.hpp:38
Definition: log_elision.hpp:24
void * LockAddr
Definition: log_elision.hpp:36
LockReleaseCount(void *addr, uint64_t count)
Definition: log_elision.hpp:26
Definition: atlas_alloc_cpp.hpp:21
LockReleaseCount & operator=(const LockReleaseCount &)=delete