Ticket #84: threadhandler.diff

File threadhandler.diff, 965 bytes (added by Joel Sherrill, on Dec 3, 2006 at 1:31:13 PM)

threadhandler.diff

  • threadhandler.c

    RCS file: /usr1/CVS/rtems/c/src/exec/score/src/threadhandler.c,v
    retrieving revision 1.5
    diff -u -r1.5 threadhandler.c
     
    5858{
    5959  ISR_Level  level;
    6060  Thread_Control *executing;
    61 #if defined(__USE_INIT_FINI__)
     61#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
    6262  static char doneConstructors;
    6363  char doneCons;
    6464#endif
     
    7373  level = executing->Start.isr_level;
    7474  _ISR_Set_level(level);
    7575
    76 #if defined(__USE_INIT_FINI__)
     76#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
    7777  doneCons = doneConstructors;
    7878  doneConstructors = 1;
    7979#endif
     
    9595  if (!doneCons)
    9696    _init ();
    9797#endif
     98#if defined(__USE__MAIN__)
     99  if (!doneCons)
     100    __main ();
     101#endif
     102
    98103 
    99104  switch ( executing->Start.prototype ) {
    100105    case THREAD_START_NUMERIC: