source: trunk/synergy/lib/mt/CMutex.cpp@ 2751

Last change on this file since 2751 was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 950 bytes
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2002 Chris Schoeneman
4 *
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.
8 *
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.
13 */
14
15#include "CMutex.h"
16#include "CArch.h"
17
18//
19// CMutex
20//
21
22CMutex::CMutex()
23{
24 m_mutex = ARCH->newMutex();
25}
26
27CMutex::CMutex(const CMutex&)
28{
29 m_mutex = ARCH->newMutex();
30}
31
32CMutex::~CMutex()
33{
34 ARCH->closeMutex(m_mutex);
35}
36
37CMutex&
38CMutex::operator=(const CMutex&)
39{
40 return *this;
41}
42
43void
44CMutex::lock() const
45{
46 ARCH->lockMutex(m_mutex);
47}
48
49void
50CMutex::unlock() const
51{
52 ARCH->unlockMutex(m_mutex);
53}
Note: See TracBrowser for help on using the repository browser.