Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
Lock.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
4 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10class Mutex;
11class CondVarBase;
12
14
20class Lock
21{
22public:
24 explicit Lock(const Mutex *mutex);
26 explicit Lock(const CondVarBase *cv);
28 ~Lock();
29
30private:
31 // not implemented
32 Lock(const Lock &);
33 Lock &operator=(const Lock &);
34
35private:
36 const Mutex *m_mutex;
37};
Generic condition variable.
Definition CondVar.h:22
~Lock()
Unlock the mutex or condition variable.
Definition Lock.cpp:26
Lock(const Mutex *mutex)
Lock the mutex mutex.
Definition Lock.cpp:16
Mutual exclusion.
Definition Mutex.h:22