Changeset f6b7b7ba in rtems
- Timestamp:
-
06/18/14 10:11:04
(10 years ago)
- Author:
- Sebastian Huber <sebastian.huber@…>
- Branches:
- 4.11, 5, master
- Children:
- 2803c8ce
- Parents:
- bd56356b
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/18/14 10:11:04)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/20/14 06:24:46)
- Message:
-
score: Fix _Thread_Delay_ended() on SMP
Suppose we have two tasks A and B and two processors. Task A is about
to delete task B. Now task B calls rtems_task_wake_after(1) on the
other processor. Task B will block on the Giant lock. Task A
progresses with the task B deletion until it has to wait for
termination. Now task B obtains the Giant lock, sets its state to
STATES_DELAYING, initializes its watchdog timer and waits. Eventually
_Thread_Delay_ended() is called, but now _Thread_Get() returned NULL
since the thread is already marked as deleted. Thus task B remained
forever in the STATES_DELAYING state.
Instead of passing the thread identifier use the thread control block
directly via the watchdog user argument. This makes
_Thread_Delay_ended() also a bit more efficient.
-
(No files)
-