next up previous contents
Next: 9.3 References Up: 9 Mutexes Previous: 9.1 Overview

9.2 State

The processor architecture-independent portion of a mutex object consists of:

struct fluke_mutex_state  {

	integer_t	hash;	/* object hash value */
	integer_t	flags;	/* attributes of the mutex */
	integer_t	locked;	/* TRUE if mutex is currently locked */
 
}
fluke_ref_t*owner_ref;

hash is the immutable hash value for the object.

flags describes the attributes of the mutex object:

MUTEX_INHERIT_PRI
Specifies that the thread currently holding the mutex should inherit the CPU priority from any thread blocking on the mutex.
MUTEX_PRI_CEILING
Use the POSIX priority ceiling protocol.
MUTEX_MULTITASK
Mutex is accessible to any thread that can access the object's memory.

locked is non-zero if the mutex object is currently locked.

owner_ref is a reference to the thread object currently holding the mutex. If null, the mutex must be unlocked (locked is FALSE).



Utah Flux Research Group