class::sys::MutexAttributes

class sys::MutexAttributes
  : public api::InfoObject

The MutexAttr class manages a pthread_mutexattr_t object.

Summary

MutexAttributes()

[MutexAttributes](#classsys_1_1_mutex_attributes_1a286b51abde6eb8a89992e7af12f5a30e)(  

const pthread_mutexattr_t & mutexattr
)

~MutexAttributes()

int get_prio_ceiling() const

int get_protocol() const

bool get_pshared() const

int get_type() const

bool is_valid() const

MutexAttributes & set_prio_ceiling(

int ceiling
)

MutexAttributes & set_protocol(

enum protocol value
)

MutexAttributes & set_pshared(

bool value
)

MutexAttributes & set_type(

enum type value
)

enum protocol

enum type

Members

MutexAttributes()

Constructs a Mutex attributes object with default values.


MutexAttributes(

const pthread_mutexattr_t & mutexattr
)

Constructs a Mutex attributes object using the specified attributes.


~MutexAttributes()

int get_prio_ceiling() const

Returns the priority ceiling.


int get_protocol() const

Returns the protocol.


bool get_pshared() const

Returns true if the mutex attributes are for process sharing.


int get_type() const

Returns the type.


bool is_valid() const

MutexAttributes & set_prio_ceiling(

int ceiling
)

Sets the priority ceiling.

Parameters

  • ceiling The priority ceiling of the mutex

Returns

Zero on success


MutexAttributes & set_protocol(

enum protocol value
)

Sets the protocol.


MutexAttributes & set_pshared(

bool value
)

Sets whether this is shared between processes.


MutexAttributes & set_type(

enum type value
)

Set the mutex type (NORMAL_TYPE or RECURSIVE_TYPE)


enum protocol
  • PRIO_NONE_PROTOCOL
  • PRIO_INHERIT_PROTOCOL
  • PRIO_PROTECT_PROTOCOL

Mutex Protocol values


enum type
  • NORMAL Normal Mutex Type
  • RECURSIVE Recursive Mutex tyep

Mutex Types


X

Thanks for Coming!

Subscribe to news and updates