sbuild::FileLock Class Reference

File locks. More...

#include <sbuild-lock.h>

Inheritance diagram for sbuild::FileLock:

Inheritance graph
[legend]
Collaboration diagram for sbuild::FileLock:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FileLock (int fd)
 The constructor.
virtual ~FileLock ()
 The destructor.
void set_lock (Type lock_type, unsigned int timeout)
void unset_lock ()
 Release a lock.

Private Attributes

int fd
 The file descriptor to lock.

Detailed Description

File locks.

Simple whole-file shared and exclusive advisory locking based upon POSIX fcntl byte region locks.


Constructor & Destructor Documentation

FileLock::FileLock int  fd  ) 
 

The constructor.

Parameters:
fd the file descriptor to lock.


Member Function Documentation

void FileLock::unset_lock  )  [virtual]
 

Release a lock.

This is equivalent to set_lock with a lock_type of LOCK_NONE and a timeout of 0.

Implements sbuild::Lock.


The documentation for this class was generated from the following files:
Generated on Thu Dec 29 17:20:07 2005 for schroot by  doxygen 1.4.5