source: rtems-schedsim/schedsim/shell/schedsim_smpsimple/wrap_thread_dispatch.c @ f40778b

Last change on this file since f40778b was f40778b, checked in by Joel Sherrill <joel.sherrill@…>, on 05/17/11 at 19:31:12

2011-05-17 Joel Sherrill <joel.sherrill@…>

  • .cvsignore, ChangeLog?, Makefile.am, README, TODO, add_commands.c, config.c, main_current_cpu.c, main_dispatch.c, main_dump_all_cpus.c, main_dump_ready_tasks.c, printheir_executing.c, schedsim.cc, smp_stub.c, wrap_thread_dispatch.c, scenarios/.cvsignore, scenarios/cpus1_mode.expected, scenarios/cpus1_mode.scen, scenarios/cpus1_priority.expected, scenarios/cpus1_priority.scen, scenarios/cpus1_resume_on_primary.expected, scenarios/cpus1_resume_on_primary.scen, scenarios/cpus1_suspend_on_primary.expected, scenarios/cpus1_suspend_on_primary.scen, scenarios/cpus4_mode_case1.expected, scenarios/cpus4_mode_case1.scen, scenarios/cpus4_mode_case2.expected, scenarios/cpus4_mode_case2.scen, scenarios/cpus4_nonpreempt_case1.expected, scenarios/cpus4_nonpreempt_case1.scen, scenarios/cpus4_pick_older.expected, scenarios/cpus4_pick_older.scen, scenarios/cpus4_priority.expected, scenarios/cpus4_priority.scen, scenarios/cpus4_simple_nopreempt.expected, scenarios/cpus4_simple_nopreempt.scen, scenarios/cpus4_simple_preemption.expected, scenarios/cpus4_simple_preemption.scen, scenarios/cpus4_suspend_on_all.expected, scenarios/cpus4_suspend_on_all.scen, scenarios/cpus4_suspend_on_primary.expected, scenarios/cpus4_suspend_on_primary.scen, scenarios/cpus4_suspend_on_secondary.expected, scenarios/cpus4_suspend_on_secondary.scen: New files.
  • Property mode set to 100644
File size: 875 bytes
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
20Thread_Control *last_heir = NULL;
21Thread_Control *last_executing = NULL;
22
23extern void __real__Thread_Dispatch(void);
24
25void 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
37void __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.