Public Methods | |
struct Flagex* | Flagex_ctor (struct Flagex *ptr_flagex, char *name) |
bool | Flagex_wait (struct Flagex *ptr_flagex, clock_t timeout) |
void | Flagex_notify (struct Flagex *ptr_flagex) |
bool | Flagex_is_locked (struct Flagex *ptr_flagex) |
bool | Flagex_lock (struct Flagex *ptr_flagex, clock_t timeout) |
void | Flagex_unlock (struct Flagex *ptr_flagex) |
void | Flagex_dtor (struct Flagex *ptr_flagex, int memory_flag) |
A Flag with Exclusion. Flagex is a son of Mutex that contains a Flag. Hence the name, a combination of FLAG and mutEX. It is a sort of synchronization object you can use when your object needs both to implement a wait-for-notification function as well as to lock and unlock like Mutex objects can. It works on the same principle as Java's "monitor lock." The main difference is that Flagex cannot notify a single thread; Flagex_notify is the equivalent of Java's Object.notifyAll().
Flagex offers three main functions:
|
Constructs a named Flagex object.
|
|
Destructor.
|
|
Checks whether Mutex is locked.
|
|
Returns a lock.
|
|
Notifies all waiting threads.
|
|
Unlocks Flagex.
|
|
Waits for notification.
|
Copyright © 2001 Cybiko, Inc. All rights reserved. | More information... |