upipe/umutex.h header reference

Upipe exclusive access to non-reentrant resource More

Header inclusion  

Members  

Type  

Functions  

Description  

Primitives in this file allow to grant exclusive, locking access to a resource.

Members detail  

#define _UPIPE_UMUTEX_H_  

This macro is declared in upipe/umutex.h source file, line 33.

struct umutex  

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.

FieldDescription
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

struct umutex * umutex_use(struct umutex *umutex)  

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

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc