Moved function doc from rwlock.h to rwlock.c

This commit is contained in:
Odin Omdal Hørthe 2007-10-20 17:08:12 +02:00
parent e628110d45
commit d9c9b4e15e
2 changed files with 29 additions and 29 deletions

View file

@ -27,6 +27,11 @@ CINELERRA_ERROR_DEFINE(RWLOCK_AGAIN, "maximum number of readlocks exceed");
CINELERRA_ERROR_DEFINE(RWLOCK_DEADLOCK, "deadlock detected");
/**
* Initialize a rwlock
* @param self is a pointer to the rwlock to be initialized
* @return self as given
*/
CinelerraRWLock
cinelerra_rwlock_init (CinelerraRWLock self)
{
@ -37,6 +42,11 @@ cinelerra_rwlock_init (CinelerraRWLock self)
return self;
}
/**
* destroy a rwlock
* @param self is a pointer to the rwlock to be initialized
* @return self on success or NULL at error
*/
CinelerraRWLock
cinelerra_rwlock_destroy (CinelerraRWLock self)
{
@ -51,6 +61,13 @@ cinelerra_rwlock_destroy (CinelerraRWLock self)
/**
* initialize a rwlockacquirer state
* @param self rwlockacquirer to be initialized, must be an automatic variable
* @param cond associated rwlock
* @param state initial state of the mutex, either CINELERRA_RDLOCKED, CINELERRA_WRLOCKED or CINELERRA_UNLOCKED
* @return self as given or NULL on error
*/
CinelerraRWLockacquirer
cinelerra_rwlockacquirer_init (CinelerraRWLockacquirer self, CinelerraRWLock rwlock, enum cinelerra_lockstate state)
{
@ -94,6 +111,12 @@ cinelerra_rwlockacquirer_init (CinelerraRWLockacquirer self, CinelerraRWLock rwl
}
/**
* readlock the rwlock.
* must not already be locked
* @param self rwlockacquirer associated with a rwlock
* @return self as given or NULL on error
*/
CinelerraRWLockacquirer
cinelerra_rwlockacquirer_rdlock (CinelerraRWLockacquirer self)
{
@ -119,6 +142,12 @@ cinelerra_rwlockacquirer_rdlock (CinelerraRWLockacquirer self)
}
/**
* writelock the rwlock.
* must not already be locked
* @param self rwlockacquirer associated with a rwlock
* @return self as given or NULL on error
*/
CinelerraRWLockacquirer
cinelerra_rwlockacquirer_wrlock (CinelerraRWLockacquirer self)
{

View file

@ -47,20 +47,10 @@ typedef struct cinelerra_rwlock_struct cinelerra_rwlock;
typedef cinelerra_rwlock* CinelerraRWLock;
/**
* Initialize a rwlock
* @param self is a pointer to the rwlock to be initialized
* @return self as given
*/
CinelerraRWLock
cinelerra_rwlock_init (CinelerraRWLock self);
/**
* destroy a rwlock
* @param self is a pointer to the rwlock to be initialized
* @return self on success or NULL at error
*/
CinelerraRWLock
cinelerra_rwlock_destroy (CinelerraRWLock self);
@ -90,32 +80,13 @@ cinelerra_rwlockacquirer_ensureunlocked (CinelerraRWLockacquirer self)
cinelerra_rwlockacquirer NOBUG_CLEANUP(cinelerra_rwlockacquirer_ensureunlocked)
/**
* initialize a rwlockacquirer state
* @param self rwlockacquirer to be initialized, must be an automatic variable
* @param cond associated rwlock
* @param state initial state of the mutex, either CINELERRA_RDLOCKED, CINELERRA_WRLOCKED or CINELERRA_UNLOCKED
* @return self as given or NULL on error
*/
CinelerraRWLockacquirer
cinelerra_rwlockacquirer_init (CinelerraRWLockacquirer self, CinelerraRWLock rwlock, enum cinelerra_lockstate state);
/**
* readlock the rwlock.
* must not already be locked
* @param self rwlockacquirer associated with a rwlock
* @return self as given or NULL on error
*/
CinelerraRWLockacquirer
cinelerra_rwlockacquirer_rdlock (CinelerraRWLockacquirer self);
/**
* writelock the rwlock.
* must not already be locked
* @param self rwlockacquirer associated with a rwlock
* @return self as given or NULL on error
*/
CinelerraRWLockacquirer
cinelerra_rwlockacquirer_wrlock (CinelerraRWLockacquirer self);