upipe/umutex.h header reference
Upipe exclusive access to non-reentrant resource More
Header inclusion
Members
Type
- struct umutex
Functions
- int umutex_lock(struct umutex *umutex)
- void umutex_release(struct umutex *umutex)
- int umutex_unlock(struct umutex *umutex)
- struct umutex * umutex_use(struct umutex *umutex)
Description
Primitives in this file allow to grant exclusive, locking access to a resource.
Members detail
This macro is declared in upipe/umutex.h source file, line 33.
This struct is declared in upipe/umutex.h source file, line 44.
This struct is the implementation of a structure that protects access to a non-reentrant resource.
Field | Description |
---|---|
struct urefcount * refcount; | pointer to refcount management structure |
int (*umutex_lock)(struct umutex *) ; | lock mutex |
int (*umutex_unlock)(struct umutex *) ; | unlock mutex |
int umutex_lock(struct umutex *umutex)
This function is declared in upipe/umutex.h source file, line 60.
This function locks a mutex.
Parameter list:
- umutex: pointer to a umutex structure
The return value is an error code
void umutex_release(struct umutex *umutex)
This function is declared in upipe/umutex.h source file, line 96.
This function decrements the reference count of a umutex or frees it.
Parameter list:
- umutex: pointer to umutex
int umutex_unlock(struct umutex *umutex)
This function is declared in upipe/umutex.h source file, line 72.
This function unlocks a mutex.
Parameter list:
- umutex: pointer to a umutex structure
The return value is an error code
This function is declared in upipe/umutex.h source file, line 84.
This function increments the reference count of a umutex.
Parameter list:
- umutex: pointer to umutex
The return value is same pointer to umutex