Opened on 05/24/11 at 13:36:16
Last modified on 12/03/13 at 14:23:55
#1809 closed defect (wontfix)
SMP : Lock/Unlock critical Section
Reported by: | Frederic Brault | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 4.11 |
Component: | score | Version: | 4.11 |
Severity: | normal | Keywords: | |
Cc: | sebastian.huber@…, gedare@…, marta.rybczynska@… | Blocked By: | |
Blocking: |
Description
This is a rather big patch, impacting many files.
It adds a call to _Lock_Critical_Section and _Unlock_Critical_Section around critical sections. Until then, those sections were mostly protected by calls to ISR_Disable/Enable.
At first, the approach we took was just to overload ISR_Enable/Disable and add a lock in this macro. But it turned out this approach is counterproductive since it mixes up two things which are fundamentaly different : locking to protect critical code sections in an SMP contetx, and setting interrupt level.
So this patch does it the hard way and adds two macros :
- _Lock_Critical_Section
- _Unlock_Critical_Section
For now, they are left blank. In our implementation, we use a "Big_Kernel_Lock", but that's another topic.
This patch can be seen as a first attempt to identify critical section in SMP code.
Most of the time, it's basically just adding a _Lock_Critical_Section() right next to ISR_Disable, and _Unlock next to ISR_Disable.
However, we have started in some places to move locks around for correctness and/or optimization.
Attachments (1)
Change History (6)
Changed on 05/24/11 at 13:36:16 by Frederic Brault
Attachment: | lock_critical_section.patch added |
---|
comment:1 Changed on 05/24/11 at 14:04:55 by Marta Rybczynska
Cc: | Marta Rybczynska added |
---|
comment:2 Changed on 10/27/11 at 23:08:28 by Gedare Bloom
blocked: | → 1946 |
---|
comment:3 Changed on 10/27/11 at 23:15:30 by Gedare Bloom
Cc: | giddyup44@… added |
---|
comment:4 Changed on 12/03/13 at 14:23:55 by Sebastian Huber
Resolution: | → wontfix |
---|---|
Status: | new → closed, sebastian.huber@embedded-brains.de |
The RTEMS SMP implementation changed considerably in the mean time.
comment:5 Changed on 11/24/14 at 18:58:28 by Gedare Bloom
Version: | HEAD → 4.11 |
---|
Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11
lock/unlock critical sections