[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rtems_semaphore_obtain
- Date: Thu, 29 Mar 2007 18:48:13 +0200
- From: johan.zandin at space.se (Johan Zandin)
- Subject: rtems_semaphore_obtain
Sergei Organov writes:
>"Johan Zandin" <johan.zandin at space.se> writes:
>> _Context_Switch( &executing->Registers, &heir->Registers );
>>
>> executing = _Thread_Executing;
>>
>> _ISR_Disable( level ); -----+
>> | Region where
>> } | an occuring
>> | interrupt
>> _Thread_Dispatch_disable_level = 0; | causes problems
>> |
>> _ISR_Enable( level ); -----+
>But how interrupt can occur when it's disabled in this region?! If
>_ISR_Disable()/_ISR_Enable() don't work on your target, you have hard
>trouble anyway.
The HW interrupt occurs but is left pending until ISRs are enabled,
so the ISR does not execute until somewhere within the _ISR_Enable call
(in the first cycle when ISRs are enabled in the CPU again).
/Johan
-----------------------------------------------------------
Johan Zandin Software Engineer
Saab Space AB Phone: +46-31-735 41 47
SE-405 15 Gothenburg, Sweden Fax: +46-31-735 40 00
-----------------------------------------------------------