base
initial
Line | |
---|
1 | /* |
---|
2 | * Thread Dispatch Wrapper Implmentation |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2010. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #include "shell.h" |
---|
15 | #include <schedsim_shell.h> |
---|
16 | |
---|
17 | #include <stdio.h> |
---|
18 | #include <rtems.h> |
---|
19 | |
---|
20 | Thread_Control *last_heir = NULL; |
---|
21 | Thread_Control *last_executing = NULL; |
---|
22 | |
---|
23 | extern void __real__Thread_Dispatch(void); |
---|
24 | |
---|
25 | void check_heir_and_executing(void) |
---|
26 | { |
---|
27 | if ( last_heir != _Thread_Heir ) |
---|
28 | PRINT_HEIR(); |
---|
29 | |
---|
30 | if ( last_executing != _Thread_Executing ) |
---|
31 | PRINT_EXECUTING(); |
---|
32 | |
---|
33 | last_heir = _Thread_Heir; |
---|
34 | last_executing = _Thread_Executing; |
---|
35 | } |
---|
36 | |
---|
37 | void __wrap__Thread_Dispatch(void) |
---|
38 | { |
---|
39 | check_heir_and_executing(); |
---|
40 | __real__Thread_Dispatch(); |
---|
41 | check_heir_and_executing(); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.