Changeset c257429f in rtems


Ignore:
Timestamp:
Nov 12, 1999, 9:15:12 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
0c5ab522
Parents:
2183b65
Message:

+ Moved error checks to before the dispatch disable where possible.
+ Modified correct return path to call _ITRON_return_errorno( E_OK ) instead

of enabling dispatching and returning E_OK.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/itron/src/cre_tsk.c

    r2183b65 rc257429f  
    3333
    3434  /*
    35    * Disable dispatching.
    36    */
    37  
    38   _Thread_Disable_dispatch();
    39 
    40   /*
    4135   * Validate Parameters.
    4236   */
    4337 
    4438 if ( pk_ctsk == NULL )
    45     _ITRON_return_errorno( E_PAR );
     39    return E_PAR;
    4640
    4741  if ((pk_ctsk->tskatr != TA_ASM ) &&
     
    5549      (pk_ctsk->tskatr != TA_COP6) &&
    5650      (pk_ctsk->tskatr != TA_COP7))
    57     _ITRON_return_errorno( E_RSATR );
     51    return E_RSATR;
    5852
    5953  if (( pk_ctsk->itskpri <= 0 ) || ( pk_ctsk->itskpri >= 256 ))
    60     _ITRON_return_errorno( E_PAR );
     54    return E_PAR;
    6155  if ( pk_ctsk->task == NULL )
    62     _ITRON_return_errorno( E_PAR );
     56    return E_PAR;
    6357  if ( pk_ctsk->stksz < 0 )
    64     _ITRON_return_errorno( E_PAR );
     58    return E_PAR;
    6559 
     60  /*
     61   * Disable dispatching.
     62   */
     63 
     64  _Thread_Disable_dispatch();
     65
    6666  /*
    6767   * allocate the thread.
     
    107107  the_thread->Start.entry_point = (Thread_Entry) pk_ctsk->task;
    108108
    109   _Thread_Enable_dispatch();
    110   return E_OK;
     109  _ITRON_return_errorno( E_OK );
    111110}
    112111
  • cpukit/itron/src/cre_tsk.c

    r2183b65 rc257429f  
    3333
    3434  /*
    35    * Disable dispatching.
    36    */
    37  
    38   _Thread_Disable_dispatch();
    39 
    40   /*
    4135   * Validate Parameters.
    4236   */
    4337 
    4438 if ( pk_ctsk == NULL )
    45     _ITRON_return_errorno( E_PAR );
     39    return E_PAR;
    4640
    4741  if ((pk_ctsk->tskatr != TA_ASM ) &&
     
    5549      (pk_ctsk->tskatr != TA_COP6) &&
    5650      (pk_ctsk->tskatr != TA_COP7))
    57     _ITRON_return_errorno( E_RSATR );
     51    return E_RSATR;
    5852
    5953  if (( pk_ctsk->itskpri <= 0 ) || ( pk_ctsk->itskpri >= 256 ))
    60     _ITRON_return_errorno( E_PAR );
     54    return E_PAR;
    6155  if ( pk_ctsk->task == NULL )
    62     _ITRON_return_errorno( E_PAR );
     56    return E_PAR;
    6357  if ( pk_ctsk->stksz < 0 )
    64     _ITRON_return_errorno( E_PAR );
     58    return E_PAR;
    6559 
     60  /*
     61   * Disable dispatching.
     62   */
     63 
     64  _Thread_Disable_dispatch();
     65
    6666  /*
    6767   * allocate the thread.
     
    107107  the_thread->Start.entry_point = (Thread_Entry) pk_ctsk->task;
    108108
    109   _Thread_Enable_dispatch();
    110   return E_OK;
     109  _ITRON_return_errorno( E_OK );
    111110}
    112111
Note: See TracChangeset for help on using the changeset viewer.