Line data Source code
1 : /*
2 : * DUNE DAQ modification notice:
3 : * This file has been modified from the original ATLAS ers source for the DUNE DAQ project.
4 : * Fork baseline commit: 8267df82a4f6fe6bf02c4014923eba19eddc4614 (2020-04-14).
5 : * Renamed since fork: yes (from src/streams/GlobalLockStream.cxx to plugins/GlobalLockStream.cpp).
6 : *
7 : * Original copyright:
8 : * Copyright (C) 2001-2020 CERN for the benefit of the ATLAS collaboration.
9 : * Licensed under the Apache License, Version 2.0.
10 : */
11 :
12 : /*
13 : * LockStream.cxx
14 : * ers
15 : *
16 : * Created by Serguei Kolos on 12.04.06.
17 : * Copyright 2004 CERN. All rights reserved.
18 : *
19 : */
20 :
21 : #include <ers/internal/GlobalLockStream.hpp>
22 :
23 42 : ERS_REGISTER_OUTPUT_STREAM( ers::GlobalLockStream, "glock", ERS_EMPTY )
24 :
25 : std::mutex ers::GlobalLockStream::mutex_;
26 :
27 0 : void ers::GlobalLockStream::write( const Issue & issue )
28 : {
29 0 : std::scoped_lock slock( mutex_ );
30 0 : chained().write( issue );
31 0 : }
|