Changeset d8918c1 in rtems-schedsim


Ignore:
Timestamp:
May 26, 2014, 7:01:06 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
205f794
Parents:
e5e757b
Message:

Misc so more scenarios run

Location:
schedsim/shell/shared
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • schedsim/shell/shared/Makefile.am

    re5e757b rd8918c1  
    2828libschedsim_a_SOURCES += commands.c
    2929libschedsim_a_SOURCES += getopt.c
     30libschedsim_a_SOURCES += getthreadexecuting.c
     31libschedsim_a_SOURCES += getthreadheir.c
    3032libschedsim_a_SOURCES += lookup_semaphore.c
    3133libschedsim_a_SOURCES += lookup_task.c
  • schedsim/shell/shared/lookup_task.c

    re5e757b rd8918c1  
     1/**
     2 * @file
     3 * @brief Given Name or ID String, give Id
     4 */
     5
    16/*
    2  *  Given Name or ID String, give Id
    3  *
    4  *  COPYRIGHT (c) 1989-2013.
     7 *  COPYRIGHT (c) 1989-2014.
    58 *  On-Line Applications Research Corporation (OAR).
    69 *
     
    1922#include <rtems/stringto.h>
    2023#include <rtems/score/threaddispatch.h>
     24#include "schedsim_shell.h"
    2125
    2226#ifndef METHOD_NAME
     
    4044    #ifdef DOING_TASKS
    4145      if ( !strcmp( string, "SELF" ) ) {
    42         _Thread_Disable_dispatch();
    43           *id = _Thread_Executing->Object.id;
    44         _Thread_Enable_dispatch();
     46        *id = get_thread_executing()->Object.id;
    4547        return 0;
    4648      }
    4749    #endif
     50#if 0
    4851    if ( strlen( string ) != 4 ) {
    4952      return -1;
    5053    }
     54#endif
    5155    memset( name, '\0', sizeof(name) );
    5256    strncpy( name, string, 4 );
  • schedsim/shell/shared/main_semobtain.c

    re5e757b rd8918c1  
    2222#include <rtems/error.h>
    2323#include <rtems/score/threaddispatch.h>
    24 
    25 static Thread_Control *get_thread_executing(void)
    26 {
    27   Thread_Control *e;
    28 
    29   _Thread_Disable_dispatch();
    30     e = _Thread_Executing;
    31   _Thread_Enable_dispatch();
    32   return e;
    33 }
    3424
    3525int rtems_shell_main_semaphore_obtain(
  • schedsim/shell/shared/main_taskwakeafter.c

    re5e757b rd8918c1  
    4545
    4646  ticks = (rtems_interval) tmp;
    47   self = _Thread_Executing->Object.id,
     47  self = get_thread_executing()->Object.id,
    4848
    4949  /*
  • schedsim/shell/shared/schedsim_shell.h

    re5e757b rd8918c1  
    2020#include <rtems.h>
    2121#include <rtems/score/sysstate.h>
     22#include "shell.h"
    2223
    2324#ifdef __cplusplus
    2425extern "C" {
    2526#endif
     27
     28Thread_Control *get_thread_executing(void);
     29Thread_Control *get_thread_heir(void);
    2630
    2731void add_commands(void);
  • schedsim/shell/shared/wrap_thread_dispatch.c

    re5e757b rd8918c1  
    6464  uint32_t   current_cpu;
    6565
     66  if ( !schedsim_is_dispatch_allowed() )
     67    return;
     68
    6669  current_cpu = Schedsim_Current_cpu;
    6770  for ( cpu=0 ; cpu < MAX_CPUS ; cpu++ ) {
Note: See TracChangeset for help on using the changeset viewer.