Changeset d37adfe5 in rtems
- Timestamp:
-
03/03/16 06:02:03
(8 years ago)
- Author:
- Sebastian Huber <sebastian.huber@…>
- Branches:
- 5, master
- Children:
- 75aef54
- Parents:
- 1547b623
- git-author:
- Sebastian Huber <sebastian.huber@…> (03/03/16 06:02:03)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (03/17/16 07:27:47)
- Message:
-
score: Fix CPU time used by executing threads
The CPU time used of a thread was previously maintained per-processor
mostly during _Thread_Dispatch(). However, on SMP configurations the
actual processor of a thread is difficult to figure out since thread
dispatching is a highly asynchronous process (e.g. via inter-processor
interrupts). Only the intended processor of a thread is known to the
scheduler easily. Do the CPU usage accounting during thread heir
updates in the context of the scheduler operations. Provide the
function _Thread_Get_CPU_time_used() to get the CPU usage of a thread
using proper locks to get a consistent value.
Close #2627.
-
(No files)
-