Shared Memory Interface - Mutexes

Summary
Shared Memory Interface - Mutexes
Files
tnt_shmem_mutex.h
Functions
tnt_shmem_mutex_initInitializes the mutex specified by the parameter mutex.
tnt_shmem_mutex_destroyDestroys the mutex specified by the parameter mutex.
tnt_shmem_mutex_lockLocks a mutex specified by the parameter mutex.
tnt_shmem_mutex_unlockUnlocks a mutex specified by the parameter mutex.

Files

tnt_shmem_mutex.h

Functions

tnt_shmem_mutex_init

tnt_ret_t tnt_shmem_mutex_init(tnt_shmem_mutex_t *mutex)

Description

Initializes the mutex specified by the parameter mutex.

Parameters

mutexthe address of the mutex to initialize.

Return

0on success.
< 0on failure.

See Also

tnt_shmem_mutex_destroy, tnt_shmem_mutex_lock, tnt_shmem_mutex_unlock

tnt_shmem_mutex_destroy

tnt_ret_t tnt_shmem_mutex_destroy(tnt_shmem_mutex_t *mutex)

Description

Destroys the mutex specified by the parameter mutex.

Parameters

mutexthe address of the mutex to destroy.

Return

0on success.
< 0on failure.

See Also

tnt_shmem_mutex_init, tnt_shmem_mutex_lock, tnt_shmem_mutex_unlock

tnt_shmem_mutex_lock

tnt_ret_t tnt_shmem_mutex_lock(tnt_shmem_mutex_t *mutex)

Description

Locks a mutex specified by the parameter mutex.

Parameters

mutexthe address of the mutex to lock.

Return

0on success.
< 0on failure.

See Also

tnt_shmem_mutex_init, tnt_shmem_mutex_destroy, tnt_shmem_mutex_unlock

tnt_shmem_mutex_unlock

tnt_ret_t tnt_shmem_mutex_unlock(tnt_shmem_mutex_t *mutex)

Description

Unlocks a mutex specified by the parameter mutex.

Parameters

mutexthe address of the mutex to unlock.

Returns

0on success.
< 0on failure.

See Also

tnt_shmem_mutex_init, tnt_shmem_mutex_destroy tnt_shmem_mutex_lock

tnt_ret_t tnt_shmem_mutex_init(tnt_shmem_mutex_t *mutex)
Initializes the mutex specified by the parameter mutex.
tnt_ret_t tnt_shmem_mutex_destroy(tnt_shmem_mutex_t *mutex)
Destroys the mutex specified by the parameter mutex.
tnt_ret_t tnt_shmem_mutex_lock(tnt_shmem_mutex_t *mutex)
Locks a mutex specified by the parameter mutex.
tnt_ret_t tnt_shmem_mutex_unlock(tnt_shmem_mutex_t *mutex)
Unlocks a mutex specified by the parameter mutex.