source: rtems-schedsim/schedsim/shell/schedsim_smpsimple/main_dump_ready_tasks.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: 951 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include <newlib/getopt.h>
13#include <stdio.h>
14#include <stdlib.h>
15#include <string.h>
16#include <ctype.h>
17
18#include "shell.h"
19#include "rtems_sched.h"
20
21#include <rtems/score/schedulerpriority.h>
22
23int main_dump_ready_tasks(int argc, char **argv)
24{
25  Chain_Control  *chain;
26  Chain_Node     *n;
27  Thread_Control *t;
28
29  printf( "=== Ready Set of Threads\n" );
30  chain = (Chain_Control *)_Scheduler.information;
31  for (n = _Chain_First( chain ); !_Chain_Is_tail(chain, n); n = n->next) {
32    t = (Thread_Control *)n;
33    printf(
34      "  0x%08x priority=%ld\n",
35      t->Object.id,
36      (long) t->current_priority
37    );
38  }
39  printf( "=== End of Ready Set of Threads\n" );
40 
41  return 0;
42}
Note: See TracBrowser for help on using the repository browser.