<br><font size=2 face="sans-serif">Hi all,</font>
<br>
<br><font size=2 face="sans-serif">On the project I'm working on we need
to protect a ressource from being accessed by multiple tasks. </font>
<br><font size=2 face="sans-serif">For this purpose we use a binary semaphore
that is created in the following manner : </font>
<br>
<br><font size=2 face="sans-serif">sc = rtems_semaphore_create( rtems_build_name(
'D', 'R', 'V', 's' ), 1,</font>
<br><font size=2 face="sans-serif">           
                     
                 
   RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY</font>
<br><font size=2 face="sans-serif">         
                 
                  | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &semDriver );</font>
<br>
<br>
<br><font size=2 face="sans-serif">We use a board based on a LEON2 Processor
and we use a few ISR as well. These ISRs must often access the same protected
ressources when triggered.</font>
<br>
<br><font size=2 face="sans-serif">The problem arise when we are in a task
that is in the middle of accessing the protected ressources and that it
obtains the semaphore and that directly after an interrupt is triggered.
The ISR would ask for a semaphore when the last one was not released yet,
because it is in the middle of being processed. We then get a deadlock!</font>
<br>
<br><font size=2 face="sans-serif">Could anyone please help me on this
? I guess the best way is to not use semaphore in ISR but how can i protect
my ressource then !</font>
<br>
<br><font size=2 face="sans-serif">The version used of RTEMS is 4.6.6</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br>
<br><font size=2 face="sans-serif">Bise Léonard</font>