#include <PrioritySemaphore.h>
Inheritance diagram for PrioritySemaphore:

Public Methods | |
| PrioritySemaphore (int count=1, unsigned int maxCount=1) | |
| virtual | ~PrioritySemaphore () throw () |
| Destroy the PrioritySemaphore. | |
| void | wait () |
| bool | tryWait (unsigned long) |
| void | post () |
| virtual int | count () throw () |
| virtual bool | tryAcquire (unsigned long timeout) |
| virtual void | acquire () |
| virtual void | release () |
Scheduling
Threads blocked on a PrioritySemaphore are resumed in priority order, highest priority first.
Error Checking
An attempt to increase a PrioritySemaphore beyond its maximum value will result in an InvalidOp_Exception.
|
||||||||||||
|
Create a new PrioritySemaphore.
|
|
|
Decrement the count, blocking that calling thread if the count becomes 0 or less than 0. The calling thread will remain blocked until the count is raised above 0 or if an exception is thrown.
Implements Lockable. |
|
|
Get the current count of the semaphore. This value may change immediately after this function returns to the calling thread.
|
|
|
Increment the count.
|
|
|
Increment the count, unblocking one thread if count is posative.
Implements Lockable. |
|
|
Decrement the count, blocking that calling thread if the count becomes 0 or less than 0. The calling thread will remain blocked until the count is raised above 0, an exception is thrown or the given amount of time expires.
Implements Lockable. |
|
|
Decrement the count.
|
|
|
Decrement the count.
|
1.2.17