Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

int phSemaphore::postToWaiting uint32_t  minimum = 1  ) 
 

This posts a semaphore to all threads waiting on a semaphore.

Parameters:
minimum Post at least minimum semaphores. If there are fewer waiting threads than minimum then the remainder will be posted unless this remainder will cause the post operation to exceed the maximum possible semaphores that the object can have outstanding.
Returns:
A value denoting the successful execution of the method and potentially the number of unposted semaphores or failure.
Return values:
phSUCCESS The method succeeded in posting minimum semaphores or semaphores to all waiting threads.
phFAIL The method failed to post any semaphores.
1 (1 or higher) The number of unposted semaphores because the maximum limit was exceeded due to minimum being large or the number of waiting threads was high.
Todo:
check to see if minimum should be 0

Definition at line 268 of file phSemaphore.cpp.





Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:45:11 2007 for phission by  doxygen 1.4.4