|
Coda Distributed File System
|
#include <pthread.h>#include <assert.h>#include <lwp/lwp.h>#include <lwp/lock.h>#include "lwp.private_pt.h"
Functions | |
| void | Lock_Init (struct Lock *lock) |
| void | ObtainReadLock (struct Lock *lock) |
| void | ObtainWriteLock (struct Lock *lock) |
| void | ObtainSharedLock (struct Lock *lock) |
| void | ReleaseReadLock (struct Lock *lock) |
| void | ReleaseWriteLock (struct Lock *lock) |
| void | ReleaseSharedLock (struct Lock *lock) |
| int | CheckLock (struct Lock *lock) |
| int | WriteLocked (struct Lock *lock) |
| int CheckLock | ( | struct Lock * | lock | ) |
Check the status of the lock
| lock | pointer to the lock |
| void Lock_Init | ( | struct Lock * | lock | ) |
Initialize the Lock structure
| lock | pointer to the lock |
| void ObtainReadLock | ( | struct Lock * | lock | ) |
Obtain the lock for reading
| lock | pointer to the lock |
| void ObtainSharedLock | ( | struct Lock * | lock | ) |
Obtain the lock as shared lock
| lock | pointer to the lock |
| void ObtainWriteLock | ( | struct Lock * | lock | ) |
Obtain the lock for writing
| lock | pointer to the lock |
| void ReleaseReadLock | ( | struct Lock * | lock | ) |
Release the lock obtained for reading
| lock | pointer to the lock |
| void ReleaseSharedLock | ( | struct Lock * | lock | ) |
Release the lock obtained as a shared lock
| lock | pointer to the lock |
| void ReleaseWriteLock | ( | struct Lock * | lock | ) |
Release the lock obtained for writing
| lock | pointer to the lock |
| int WriteLocked | ( | struct Lock * | lock | ) |
Check if the lock was acquired for reading
| lock | pointer to the lock |