diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-07-04 09:10:08 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-07-04 09:10:08 +0000 |
commit | 35a58f784af38c9390158f1285d40c1e53baa884 (patch) | |
tree | 7621cde768ebe650a37b9b88f57fd9fb56a33a1a | |
parent | bf12a1de64508d72adbcc08ffbe4cb212260a6d6 (diff) | |
download | fetchmail-35a58f784af38c9390158f1285d40c1e53baa884.tar.gz fetchmail-35a58f784af38c9390158f1285d40c1e53baa884.tar.bz2 fetchmail-35a58f784af38c9390158f1285d40c1e53baa884.zip |
Add documentation for Doxygen.
svn path=/branches/BRANCH_6-3/; revision=4861
-rw-r--r-- | lock.h | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -1,12 +1,36 @@ +/** \file lock.h function declarations (API) for lock.c */ + #ifndef FM_LOCK_H #define FM_LOCK_H -/* lock.c: concurrency locking */ +/* from lock.c: concurrency locking */ + +/** Set up the global \a lockfile variable (but do not lock yet). */ void fm_lock_setup(struct runctl *); + +/** Assert that we already possess a lock. */ void fm_lock_assert(void); + +/** Obtain a lock or exit the program with PS_EXCLUDE. This function is + * idempotent, that means it can be run even if we already have the + * lock. Note that fm_lock_setup() has to be run beforehand; this + * function does not check that condition. */ void fm_lock_or_die(void); + +/** Release the lock (unlink the lockfile). */ void fm_lock_release(void); + +/** Check the state of the lock file. If there is an error opening or + * reading the lockfile, exit with PS_EXCLUDE. If a stale lock file + * cannot be unlinked, complain, but continue. \return + * - 0 if no lock is set + * - >0 if a fetchmail is running, but not in daemon mode + * - <0 if a fetchmail is running in daemon mode. + */ int fm_lock_state(void); + +/** If atexit(3) is available on the system this software is compiled on, + * register an exit handler to dipose of the lock on process exit. */ void fm_lock_dispose(void); #endif |