Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes
ArcSec::FileLock Class Reference

List of all members.

Public Member Functions

 FileLock (int h)
 ~FileLock (void)
 operator bool (void)
bool operator! (void)

Private Attributes

int h_

Detailed Description

Definition at line 31 of file SimpleMap.cpp.


Constructor & Destructor Documentation

ArcSec::FileLock::FileLock ( int  h) [inline]

Definition at line 36 of file SimpleMap.cpp.

                 :h_(h) {
    if(h_ == -1) return;
    l_.l_type=F_WRLCK;
    l_.l_whence=SEEK_SET;
    l_.l_start=0;
    l_.l_len=0;
    for(;;) {
      if(fcntl(h_,F_SETLKW,&l_) == 0) break;
      if(errno != EINTR) { h_=-1; return; };
    };
  };
ArcSec::FileLock::~FileLock ( void  ) [inline]

Definition at line 47 of file SimpleMap.cpp.

                  {
    if(h_ == -1) return;
    l_.l_type=F_UNLCK;
    fcntl(h_,F_SETLKW,&l_);
  };

Member Function Documentation

ArcSec::FileLock::operator bool ( void  ) [inline]

Definition at line 52 of file SimpleMap.cpp.

{ return (h_ != -1); };
bool ArcSec::FileLock::operator! ( void  ) [inline]

Definition at line 53 of file SimpleMap.cpp.

{ return (h_ == -1); };

Member Data Documentation

int ArcSec::FileLock::h_ [private]

Definition at line 33 of file SimpleMap.cpp.


The documentation for this class was generated from the following file: