source: rtems-schedsim/schedsim/shell/schedsim_smpsimple/main_dump_ready_tasks.c @ 9a34e3a

Last change on this file since 9a34e3a was a2aad55, checked in by Joel Sherrill <joel.sherrill@…>, on May 1, 2013 at 12:41:56 AM

Remove CVS $

  • Property mode set to 100644
File size: 939 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2013.
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
10#include <newlib/getopt.h>
11#include <stdio.h>
12#include <stdlib.h>
13#include <string.h>
14#include <ctype.h>
15
16#include "shell.h"
17#include "rtems_sched.h"
18
19#include <rtems/score/schedulerpriority.h>
20
21int main_dump_ready_tasks(int argc, char **argv)
22{
23  Chain_Control  *chain;
24  Chain_Node     *n;
25  Thread_Control *t;
26
27  printf( "=== Ready Set of Threads\n" );
28  chain = (Chain_Control *)_Scheduler.information;
29  for (n = _Chain_First( chain ); !_Chain_Is_tail(chain, n); n = n->next) {
30    t = (Thread_Control *)n;
31    printf(
32      "  0x%08x priority=%ld\n",
33      t->Object.id,
34      (long) t->current_priority
35    );
36  }
37  printf( "=== End of Ready Set of Threads\n" );
38 
39  return 0;
40}
Note: See TracBrowser for help on using the repository browser.