xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdFrc
XrdFrcXLock.hh
Go to the documentation of this file.
1
#ifndef __FRCXLOCK_HH__
2
#define __FRCXLOCK_HH__
3
/******************************************************************************/
4
/* */
5
/* X r d F r c X L o c k . h h */
6
/* */
7
/* (c) 2010 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-AC02-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
#include "
XrdOuc/XrdOucSxeq.hh
"
14
15
class
XrdFrcXLock
16
{
17
public
:
18
19
static
int
Init
(
const
char
*aPath)
20
{
XrdOucSxeq
mySxeq(
".frmxeq"
, 0, aPath);
21
return
((
lkFD
= mySxeq.
Detach
()) >= 0);
22
}
23
24
XrdFrcXLock
() {
XrdOucSxeq::Serialize
(
lkFD
, 0);}
25
~XrdFrcXLock
() {
XrdOucSxeq::Release
(
lkFD
);}
26
27
private
:
28
29
static
int
lkFD
;
30
};
31
32
#ifndef __FRCXLOCK_CC__
33
#define __FRCXLOCK_CC__
34
int
XrdFrcXLock::lkFD
= -1;
35
#endif
36
37
#endif
Generated by
1.8.1.2