dacs_mutex_try_lock

NAME

dacs_mutex_try_lock - Attempt to acquire a lock on a mutual exclusion variable.

SYNOPSIS

DACS_ERR_T dacs_mutex_try_lock ( dacs_mutex_t mutex )

Call parameter  
mutex The handle of the mutex to lock.

DESCRIPTION

The dacs_mutex_try_lock service attempts to acquire a lock on a mutex. The caller must either be the owner of the mutex, or have previously accepted the mutex with a call to dacs_mutex_accept(). If the mutex is available for locking, this service gets the lock and returns. If a lock on the mutex is not available, this method returns with a DACS_ERR_MUTEX_BUSY status.

RETURN VALUE

The dacs_mutex_try_lock service returns an error indicator defined as:
  • DACS_SUCCESS: normal return; lock was acquired.
  • DACS_ERR_MUTEX_BUSY: the mutex is not available.
  • DACS_ERR_INVALID_HANDLE: the specified mutex handle is not valid.

SEE ALSO

dacs_mutex_init(3), dacs_mutex_share(3), dacs_mutex_accept(3), dacs_mutex_lock(3), dacs_mutex_unlock(3), dacs_mutex_release(3), dacs_mutex_destroy(3)