Changeset a2a8c5b in rtems for cpukit/sapi/src/exinit.c


Ignore:
Timestamp:
May 9, 2002, 9:41:05 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
2aa61582
Parents:
85c9257
Message:

2001-05-09 Joel Sherrill <joel@…>

  • src/exinit.c: Slightly rework initialization so there is a valid thread as _Thread_Executing when the pre_tasking hook is called. This allows one directives and malloc to potentially use mutex protection.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/exinit.c

    r85c9257 ra2a8c5b  
    3030
    3131#include <rtems/score/apiext.h>
     32#if 0
     33#include <rtems/score/apimutex.h>
     34#endif
    3235#include <rtems/score/copyrt.h>
    3336#include <rtems/score/heap.h>
     
    222225  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
    223226
     227  /*
     228   *  No threads should be created before this point!!!
     229   *  _Thread_Executing and _Thread_Heir are not set.
     230   *
     231   *  At this point all API extensions are in place.  After the call to
     232   *  _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
     233   */
     234
     235  _Thread_Create_idle();
     236
     237
     238  /*
     239   *  Scheduling can properly occur now as long as we avoid dispatching.
     240   */
     241
    224242  if ( cpu_table->pretasking_hook )
    225243    (*cpu_table->pretasking_hook)();
    226 
    227   /*
    228    *  No threads should be created before this point!!!
    229    *
    230    *  At this point all API extensions are in place.  After the call to
    231    *  _Thread_Create_idle() _Thread_Executing will be set.
    232    *  and _Thread_Heir are not set yet.
    233    */
    234 
    235   _Thread_Create_idle();
    236244
    237245#if defined(RTEMS_MULTIPROCESSING)
Note: See TracChangeset for help on using the changeset viewer.