xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdOuc
XrdOucLock.hh
Go to the documentation of this file.
1
#ifndef __OUC_LOCK_HH__
2
#define __OUC_LOCK_HH__
3
/******************************************************************************/
4
/* */
5
/* X r d O u c L o c k . h h */
6
/* */
7
/* (c) 2003 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved */
9
/* Produced by Andrew Hanushevsky for Stanford University under contract */
10
/* DE-AC03-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
// $Id$
14
15
#include "
XrdSys/XrdSysPthread.hh
"
16
17
class
XrdOucLock
18
{
19
public
:
20
XrdOucLock
(
XrdSysMutex
*mp)
21
{
Mutex
= mp;
Mutex
->
Lock
();
isLocked
= 1;}
22
~XrdOucLock
() {
if
(
isLocked
)
Mutex
->
UnLock
();}
23
24
private
:
25
26
XrdSysMutex
*
Mutex
;
27
int
isLocked
;
28
};
29
#endif
Generated by
1.8.1.2