#1817 closed defect

Variable _Thread_Heir is not protected against interrupts

Reported by: Helder Silva Owned by: Sebastian Huber
Priority: normal Milestone: 4.11
Component: score Version: 4.10
Severity: normal Keywords:
Cc: sebastian.huber@…, gedare@… Blocked By:

Description (last modified by Joel Sherrill)

Variable _Thread_Heir is protected against interrupts except when the
_Thread_Is_heir function is called from _Thread_Evaluate_mode from
rtems_task_mode. Interrupts need to be disabled before thread evaluation for
context switch.

Attachments (2)

1817.diff (9.1 KB) - added by Helder Silva on 09/22/11 at 09:40:26.
Patch of the bug implementation on the head of the repository 20110921
output.txt (124.8 KB) - added by Helder Silva on 09/22/11 at 09:57:30.
Tests output.

Download all attachments as: .zip

Change History (13)

comment:1 Changed on 06/15/11 at 15:37:54 by Gedare Bloom

Cc: giddyup44@… added
Version: HEAD4.10

Changed on 09/22/11 at 09:40:26 by Helder Silva

Attachment: 1817.diff added

Patch of the bug implementation on the head of the repository 20110921

Changed on 09/22/11 at 09:57:30 by Helder Silva

Attachment: output.txt added

Tests output.

comment:2 Changed on 09/22/11 at 10:05:54 by Sebastian Huber

attachments.ispatch: 01
attachments.mimetype: application/octet-streamtext/plain

comment:3 Changed on 09/22/11 at 10:09:21 by Sebastian Huber

Cc: Sebastian Huber added

comment:4 Changed on 09/22/11 at 13:20:03 by Sebastian Huber

Replying to comment:8:

Yes, you are right, if you consider *a=b as atomic instruction, the
*a = b;

is unnecessary. Please just keep in mind the final assembly code, which is

not atomic.

Yes, you are right. We have a read and a write.

comment:5 Changed on 11/23/14 at 16:36:17 by Joel Sherrill

Description: modified (diff)
Owner: changed from Joel Sherrill to Sebastian Huber
Status: newassigned

Sebastian .. OK to close?

comment:6 Changed on 11/24/14 at 11:06:51 by Sebastian Huber

I still don't know what the problem is.

comment:7 Changed on 11/27/14 at 12:53:02 by Sebastian Huber

Resolution: fixed
Status: assignedclosed

I reviewed rtems_task_mode(). There is no problem since a call to a global function (_ISR_Set_level()) is between the executing->is_preemptible update and the call to _Thread_Is_heir().

comment:8 Changed on 11/27/14 at 12:54:11 by Sebastian Huber

Resolution: fixed
Status: closedreopened

comment:9 Changed on 11/27/14 at 12:54:27 by Sebastian Huber

Resolution: wontfix
Status: reopenedclosed

comment:10 Changed on 11/27/14 at 15:56:16 by Gedare Bloom

You looked at 4.10 also?

comment:11 Changed on 11/28/14 at 10:22:04 by Sebastian Huber

Thanks for the remainder. I looked now also at 4.10. I don't see a problem here.

Note: See TracTickets for help on using tickets.