users Digest, Vol 146, Issue 25

Sebastian Huber sebastian.huber at
Wed Nov 28 18:13:35 UTC 2018

----- Am 28. Nov 2018 um 17:00 schrieb Arturo Perez Garcia arturo.perez at

> I didn't call rtems_semaphore_release in the Init task, because the
> initial count of the semaphore is 1. So that was not the case.

Oh, yes, sorry for the confusion. Using a count of 0 makes the creator the owner.

> I followed the guidelines described in RTEMS C User Documentation
> Release 4.11.3. Section 12.2 paragraph 2:
> "A binary semaphore can be used to control access
> to a single resource. In particular, it can
> be used to enforce mutual exclusion for a critical
> section in user code. In this instance, the
> semaphore would be created with an initial
> count of one to indicate that no task is executing
> the critical section of code..."

Yes, I would debug the rtems_semaphore_obtain() call to figure out what is wrong. You can also try to create a self contained test case.

More information about the users mailing list