ATLAS Offline Software
Loading...
Searching...
No Matches
upgrade_mutex.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
4 */
17
18
19#ifndef ATHCONTAINERS_UPGRADE_MUTEX_H
20#define ATHCONTAINERS_UPGRADE_MUTEX_H
21
22
23#ifdef ATHCONTAINERS_NO_THREADS
24
25
26namespace AthContainers_detail {
27
28
32class upgrade_mutex
33{
34public:
35 void lock() {}
36 void unlock() {}
37 void lock_shared() {}
38 void unlock_shared() {}
39 void lock_upgrade() {}
40 void unlock_upgrade() {}
41 void unlock_upgrade_and_lock() {}
42private:
43 // Real upgrade_mutex is not assignable. Need this for proper
44 // dictionary generation.
45 upgrade_mutex& operator= (const upgrade_mutex&);
46};
47
48
49} // AthContainers_detail
50
51
52#else // not ATHCONTAINERS_NO_THREADS
53
54
55#include "boost/thread/shared_mutex.hpp"
56
57
58namespace AthContainers_detail {
59
60
61using boost::upgrade_mutex;
62
63
64} // namespace AthContainers_detail
65
66
67#endif // not ATHCONTAINERS_NO_THREADS
68
69
70#endif // not ATHCONTAINERS_UPGRADE_MUTEX_H