Chris O'Byrne - YAVRTOS |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Semaphores
Detailed DescriptionA semaphore contains a number that tasks can suspend themselves against, waiting for the number to reach at least a certain value before the task is schedulable again.To update a semaphore's value, use increment_semaphore_by() To read a semaphore's value, use get_semaphore_value() To lock on a semaphore, use wait_for_min_value() or wait_for_increment_of() See using semaphores for information on how to use semaphores Function Documentation
Get the current value of a semaphore. This function may be called anywhere
Increment the value of a semaphore by the given amount. The arguments are
When called from a task, this function may end up yielding control to a higher-priority task that is waiting on the semaphore.
Wait for a semaphore to increment its value by a certain amount. The arguments are
Wait for a semaphore to reach at least a particular value. Since the calling task could be suspended, this can only be called by a task with a non-zero priority
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
YAVRTOS and YAVRTOS documentation Copyright © 2007-2008 Chris O'Byrne. Email - chris <at> obyrne <dot> com