ROFL-pipeline  v0.6.0dev
Functions
Locking API

Locking (mutex, rwlock) API definition, that must be implemented by the library users. More...

Functions

ROFL_BEGIN_DECLS platform_mutex_t * platform_mutex_init (void *params)
 Allocates and initializes a mutex. More...
 
void platform_mutex_destroy (platform_mutex_t *mutex)
 Destroys and deallocates a mutex previously inited by platform_mutex_init(). More...
 
void platform_mutex_lock (platform_mutex_t *mutex)
 Locks the platform_mutex_t mutex. More...
 
void platform_mutex_unlock (platform_mutex_t *mutex)
 Unlocks the platform_mutex_t mutex. More...
 
platform_rwlock_t * platform_rwlock_init (void *params)
 Allocates and initializes a rwlock. More...
 
void platform_rwlock_destroy (platform_rwlock_t *rwlock)
 Destroys and deallocates a rwlock previously inited by platform_rwlock_init(). More...
 
void platform_rwlock_rdlock (platform_rwlock_t *rwlock)
 Performs a read-lock over the platform_rwlock_t mutex platform_mutex_init(). More...
 
void platform_rwlock_rdunlock (platform_rwlock_t *rwlock)
 Performs a read-unlock over the platform_rwlock_t mutex platform_mutex_init(). More...
 
void platform_rwlock_wrlock (platform_rwlock_t *rwlock)
 Performs a write-lock over the platform_rwlock_t mutex platform_mutex_init(). More...
 
void platform_rwlock_wrunlock (platform_rwlock_t *rwlock)
 Performs a write-unlock over the platform_rwlock_t mutex platform_mutex_init(). More...
 

Detailed Description

Locking (mutex, rwlock) API definition, that must be implemented by the library users.

Function Documentation

void platform_mutex_destroy ( platform_mutex_t *  mutex)

Destroys and deallocates a mutex previously inited by platform_mutex_init().

platform_mutex_destroy() has a slightly different semantic as POSIXs mutex_destroy. platform_mutex_desttroy() must first destroy (POSIX's mutex_destroy) the lock AND then release the memory previously allocated.

ROFL_BEGIN_DECLS platform_mutex_t* platform_mutex_init ( void *  params)

Allocates and initializes a mutex.

platform_mutex_init() has a slightly different semantic as POSIXs mutex_init. platform_mutex_init() must allocate the memory for the mutex AND then perform the mutex initialization (POSIX's mutex_init).

void platform_mutex_lock ( platform_mutex_t *  mutex)

Locks the platform_mutex_t mutex.

platform_mutex_init()

This has the same semantic as POSIX call.

void platform_mutex_unlock ( platform_mutex_t *  mutex)

Unlocks the platform_mutex_t mutex.

platform_mutex_init()

This has the same semantic as POSIX call.

void platform_rwlock_destroy ( platform_rwlock_t *  rwlock)

Destroys and deallocates a rwlock previously inited by platform_rwlock_init().

platform_rwlock_destroy() has a slightly different semantic as POSIXs rwlock_destroy. platform_rwlcok_destroy() must first destroy the lock (POSIX's rwlock_destroy) AND then release the memory previously allocated.

platform_rwlock_t* platform_rwlock_init ( void *  params)

Allocates and initializes a rwlock.

platform_rwlock_init() has a slightly different semantic as POSIXs rwlock_init. platform_mutex_init() must allocate the memory for the rwlock AND then perform the mutex initialization (POSIX's rwlock_init).

void platform_rwlock_rdlock ( platform_rwlock_t *  rwlock)

Performs a read-lock over the platform_rwlock_t mutex platform_mutex_init().

This has the same semantic as POSIX call.

void platform_rwlock_rdunlock ( platform_rwlock_t *  rwlock)

Performs a read-unlock over the platform_rwlock_t mutex platform_mutex_init().

This has the same semantic as POSIX call.

void platform_rwlock_wrlock ( platform_rwlock_t *  rwlock)

Performs a write-lock over the platform_rwlock_t mutex platform_mutex_init().

This has the same semantic as POSIX call.

void platform_rwlock_wrunlock ( platform_rwlock_t *  rwlock)

Performs a write-unlock over the platform_rwlock_t mutex platform_mutex_init().

This has the same semantic as POSIX call.