2
* synergy -- mouse and keyboard sharing utility
3
* Copyright (C) 2002 Chris Schoeneman
5
* This package is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* found in the file COPYING that should have accompanied this file.
9
* This package is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
18
#include "IArchMultithread.h"
22
A non-recursive mutual exclusion object. Only one thread at a time can
23
hold a lock on a mutex. Any thread that attempts to lock a locked mutex
24
will block until the mutex is unlocked. At that time, if any threads are
25
blocked, exactly one waiting thread will acquire the lock and continue
26
running. A thread may not lock a mutex it already owns the lock on; if
27
it tries it will deadlock itself.
32
//! Equivalent to default c'tor
34
Copy c'tor doesn't copy anything. It just makes it possible to
35
copy objects that contain a mutex.
37
CMutex(const CMutex&);
40
//! @name manipulators
45
This does nothing. It just makes it possible to assign objects
48
CMutex& operator=(const CMutex&);
56
Locks the mutex, which must not have been previously locked by the
57
calling thread. This blocks if the mutex is already locked by another
66
Unlocks the mutex, which must have been previously locked by the
74
friend class CCondVarBase;