dm_mutex Module

POSIX mutex abstraction layer. Has to be linked with -lpthread.


Uses

  • module~~dm_mutex~~UsesGraph module~dm_mutex dm_mutex module~dm_error dm_error module~dm_mutex->module~dm_error unix unix module~dm_mutex->unix module~dm_ascii dm_ascii module~dm_error->module~dm_ascii module~dm_kind dm_kind module~dm_error->module~dm_kind iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Used by

  • module~~dm_mutex~~UsedByGraph module~dm_mutex dm_mutex module~dmpack dmpack module~dmpack->module~dm_mutex

Derived Types

type, public ::  mutex_type

Opaque mutex type.


Functions

public function dm_mutex_create(mutex) result(rc)

Creates a new mutex. Returns E_SYSTEM on error.

Arguments

Type IntentOptional Attributes Name
type(mutex_type), intent(inout) :: mutex

Mutex type.

Return Value integer

public function dm_mutex_destroy(mutex) result(rc)

Destroys mutex. Returns E_SYSTEM on error.

Arguments

Type IntentOptional Attributes Name
type(mutex_type), intent(inout) :: mutex

Mutex type.

Return Value integer

public function dm_mutex_is_locked(mutex) result(is)

Returns .true. if mutex is locked.

Arguments

Type IntentOptional Attributes Name
type(mutex_type), intent(inout) :: mutex

Mutex type.

Return Value logical

public function dm_mutex_lock(mutex) result(rc)

Locks mutex. Returns E_SYSTEM on error.

Arguments

Type IntentOptional Attributes Name
type(mutex_type), intent(inout) :: mutex

Mutex type.

Return Value integer

public function dm_mutex_try_lock(mutex) result(rc)

Tries to lock mutex. Returns E_SYSTEM on error.

Arguments

Type IntentOptional Attributes Name
type(mutex_type), intent(inout) :: mutex

Mutex type.

Return Value integer

public function dm_mutex_unlock(mutex) result(rc)

Unlocks mutex. Returns E_SYSTEM on error.

Arguments

Type IntentOptional Attributes Name
type(mutex_type), intent(inout) :: mutex

Mutex type.

Return Value integer