Deskflow 1.22.0.197
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
10#include "common/Common.h"
11
12class Mutex;
13class CondVarBase;
14
16
22class Lock
23{
24public:
26 explicit Lock(const Mutex *mutex);
28 explicit Lock(const CondVarBase *cv);
30 ~Lock();
31
32private:
33 // not implemented
34 Lock(const Lock &);
35 Lock &operator=(const Lock &);
36
37private:
38 const Mutex *m_mutex;
39};
Generic condition variable.
Definition CondVar.h:23
~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