rtems_semaphore_obtain
Eric Norum
norume at aps.anl.gov
Thu Mar 22 13:51:13 UTC 2007
On Mar 22, 2007, at 4:23 AM, Sergei Organov wrote:
>
> I'd like first to understand why RTEMS_SIMPLE_BINARY_SEMAPHORE has
> been
> implemented through kernel mutex in the first place. If there were no
> sound reasons, then I'd go with switching to implementation through
> kernel semaphore.
>
Correct me if I am wrong, but I was under the impression that a
'classic' semaphore as described by Dijkstra (limited to values 1 and
0) could be used successfully for process synchronization or for
mutual exclusion. The only difference is in the way the semaphore is
initialized. If it starts out 'open' its semantics are that of a
mutex. If it starts out 'closed' its semantics are those of process
synchronization. Thus I don't see anything wrong with implementing
RTEMS_SIMPLE_BINARY_SEMAPHORE with a core mutex.
Can you show in the RTEMS implementation of
RTEMS_SIMPLE_BINARY_SEMAPHORE where the problem with releasing from
an ISR occurs? If so we should either fix what is broken or as you
suggested change the RTEMS_SIMPLE_BINARY_SEMAPHORE implementation to
use a core semaphore. If there's no identifiable problem with the
existing implementation I see no need to make any changes.
--
Eric Norum <norume at aps.anl.gov>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
More information about the users
mailing list