How to reset semaphore
leonp at plris.com
Thu Apr 19 17:31:55 UTC 2007
On Thursday 19 April 2007, Sergei Organov wrote:
> Leon Pollak <leonp at plris.com> writes:
> > Hello, all.
> > I searched the UM and did not find something suitable.
> > I have a counting semaphore. At some point I have the situation when I
> > need to reset the counter (to zero).
> > How can I do this if I do not want to delete it (too complicated - its ID
> > is known and used by the whole system)?
> while(rtems_semaphore_obtain(id, RTEMS_NO_WAIT, 0) == RTEMS_SUCCESSFUL)
> -- Sergei.
May be there some more fast solutions? :-))
More information about the users