|
Public Member Functions |
bool | is_locked () const |
| Did the lock operation succeed?
|
| lock_status_t (status_t e) |
| Constructor for failing to lock.
|
| lock_status_t (void(*f)(void *), void *d) |
| Constructor for successfully holding a lock.
|
| operator status_t () const |
| Conversion operator for status code, synonym for status().
|
status_t | status () const |
| B_OK if the lock is held, else an error code.
|
void | unlock () const |
| Call to release the lock. May only be called once.
|
Public Attributes |
void(* | unlock_func )(void *data) |
| unlock function, NULL if lock failed
|
union { |
void * data |
| locked object if "unlock_func" is non-NULL
|
status_t error |
| error if "unlock_func" is NULL
|
} | value |