Changeset afb11f8 in rtems


Ignore:
Timestamp:
Nov 12, 1999, 10:00:10 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
fb27af76
Parents:
624d7ca
Message:

+ Modified calls to use TSK_SLF for calls to self.
+ Modified calls to use the task id macro for calls to the PREEMPT task.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/itrontests/itrontask02/init.c

    r624d7ca rafb11f8  
    9191  pk_ctsk.exinf    = NULL;
    9292  pk_ctsk.tskatr   = TA_HLNG;
    93   pk_ctsk.itskpri  = 1; 
     93  pk_ctsk.itskpri  = 1;
    9494  pk_ctsk.task     = Preempt_task;
    9595  pk_ctsk.stksz    = RTEMS_MINIMUM_STACK_SIZE;
     
    111111  assert( status == E_ID );
    112112
    113   puts( "Init - cre_tsk - cannot create self (0) - E_ID" );
    114   status = cre_tsk( 0, &pk_ctsk );
     113  puts( "Init - cre_tsk - cannot create TSK_SELF - E_ID" );
     114  status = cre_tsk( TSK_SELF, &pk_ctsk );
    115115  assert( status == E_ID );
    116116
     
    175175
    176176
    177   puts( "Init - del_tsk - cannot delete self - E_OBJ" );
    178   status = del_tsk( 1 );
     177  puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
     178  status = del_tsk( TSK_SELF );
    179179  assert( status == E_OBJ );
    180180
    181181  puts( "Init - del_tsk - task is not DORMANT - E_OBJ" );
    182   status = del_tsk( 1 );
     182  status = del_tsk( PREEMPT_TASK_ID );
    183183  assert( status == E_OBJ );
    184184
     
    191191  assert( status == E_OACV );
    192192
    193   puts( "Init - del_tsk - cannot delete SELF - E_OBJ" );
    194   status = del_tsk( 0 );
     193  puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
     194  status = del_tsk( TSK_SELF );
    195195  assert( status == E_OBJ );
    196196
     
    216216  assert( status == E_ID );
    217217
    218   puts( "Init - sta_tsk - cannot start SELF - E_OBJ" );
    219   status = sta_tsk( 0, 1 );
     218  puts( "Init - sta_tsk - cannot start TSK_SELF - E_OBJ" );
     219  status = sta_tsk( TSK_SELF, 1 );
    220220  assert( status == E_OBJ );
    221221
    222222  puts( "Init - sta_tsk - task is not DORMANT  - E_OBJ" );
    223   status = sta_tsk( 1, 1 );
     223  status = sta_tsk( PREEMPT_TASK_ID, 1 );
    224224  assert( status == E_OBJ );
    225225
     
    256256  assert( status == E_ID );
    257257
    258   puts( "Init - ter_tsk - cannot terminate SELF (0) - E_OBJ" );
    259   status = ter_tsk( 0 );
     258  puts( "Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ" );
     259  status = ter_tsk( TSK_SELF );
    260260  assert( status == E_OBJ );
    261261
    262262  puts( "Init - ter_tsk - task is not DORMANT - E_OBJ" );
    263   status = ter_tsk( 1 );
     263  status = ter_tsk( PREEMPT_TASK_ID );
    264264  assert( status == E_OBJ );
    265265
     
    295295
    296296  /*  Call from task independent portion to cause E_OBJ
    297   puts( "Init - chg_pri - change priority of SELF - E_OBJ" );
    298   status = chg_pri( 0, 1 );
     297  puts( "Init - chg_pri - change priority of TSK_SELF - E_OBJ" );
     298  status = chg_pri( TSK_SELF, 1 );
    299299  assert( status == E_OBJ );
    300300  */
    301301
    302   /*  Need a dormant task to call
     302  /*  Need a dormant task to call */
    303303  puts( "Init - chg_pri - task is not DORMANT - E_OBJ" );
    304   status = chg_pri( 1, 1 );
    305   assert( status == E_OBJ );
    306   */
     304  status = chg_pri( PREEMPT_TASK_ID, 1 );
     305  assert( status == E_OBJ );
    307306
    308307  puts( "Init - chg_pri - task does not exist - E_NOEXS" );
     
    364363  /*  Call from task independent portion to cause E_ID
    365364  puts( "Init - ref_tsk - reference SELF - E_ID" );
    366   status = ref_tsk( &pk_rtsk, 0 );
     365  status = ref_tsk( &pk_rtsk, TSK_SELF );
    367366  assert( status == E_ID );
    368367  */
     
    400399
    401400  puts( "Init - sus_tsk - cannot suspend SELF - E_OBJ" );
    402   status = sus_tsk( 0 );
     401  status = sus_tsk( TSK_SELF );
    403402  assert( status == E_OBJ );
    404403
     
    434433
    435434  puts( "Init - rsm_tsk - cannot resume SELF - E_OBJ" );
    436   status = rsm_tsk( 0 );
     435  status = rsm_tsk( TSK_SELF );
    437436  assert( status == E_OBJ );
    438437
    439438  puts( "Init - rsm_tsk - task is DORMANT - E_OBJ" );
    440   status = rsm_tsk( 1 );
     439  status = rsm_tsk( PREEMPT_TASK_ID );
    441440  assert( status == E_OBJ );
    442441
     
    463462
    464463  puts( "Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ" );
    465   status = frsm_tsk( 0 );
     464  status = frsm_tsk( TSK_SELF );
    466465  assert( status == E_OBJ );
    467466
    468467  puts( "Init - frsm_tsk - task is DORMANT - E_OBJ" );
    469   status = frsm_tsk( 1 );
     468  status = frsm_tsk( PREEMPT_TASK_ID );
    470469  assert( status == E_OBJ );
    471470
  • testsuites/itrontests/itrontask02/init.c

    r624d7ca rafb11f8  
    9191  pk_ctsk.exinf    = NULL;
    9292  pk_ctsk.tskatr   = TA_HLNG;
    93   pk_ctsk.itskpri  = 1; 
     93  pk_ctsk.itskpri  = 1;
    9494  pk_ctsk.task     = Preempt_task;
    9595  pk_ctsk.stksz    = RTEMS_MINIMUM_STACK_SIZE;
     
    111111  assert( status == E_ID );
    112112
    113   puts( "Init - cre_tsk - cannot create self (0) - E_ID" );
    114   status = cre_tsk( 0, &pk_ctsk );
     113  puts( "Init - cre_tsk - cannot create TSK_SELF - E_ID" );
     114  status = cre_tsk( TSK_SELF, &pk_ctsk );
    115115  assert( status == E_ID );
    116116
     
    175175
    176176
    177   puts( "Init - del_tsk - cannot delete self - E_OBJ" );
    178   status = del_tsk( 1 );
     177  puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
     178  status = del_tsk( TSK_SELF );
    179179  assert( status == E_OBJ );
    180180
    181181  puts( "Init - del_tsk - task is not DORMANT - E_OBJ" );
    182   status = del_tsk( 1 );
     182  status = del_tsk( PREEMPT_TASK_ID );
    183183  assert( status == E_OBJ );
    184184
     
    191191  assert( status == E_OACV );
    192192
    193   puts( "Init - del_tsk - cannot delete SELF - E_OBJ" );
    194   status = del_tsk( 0 );
     193  puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
     194  status = del_tsk( TSK_SELF );
    195195  assert( status == E_OBJ );
    196196
     
    216216  assert( status == E_ID );
    217217
    218   puts( "Init - sta_tsk - cannot start SELF - E_OBJ" );
    219   status = sta_tsk( 0, 1 );
     218  puts( "Init - sta_tsk - cannot start TSK_SELF - E_OBJ" );
     219  status = sta_tsk( TSK_SELF, 1 );
    220220  assert( status == E_OBJ );
    221221
    222222  puts( "Init - sta_tsk - task is not DORMANT  - E_OBJ" );
    223   status = sta_tsk( 1, 1 );
     223  status = sta_tsk( PREEMPT_TASK_ID, 1 );
    224224  assert( status == E_OBJ );
    225225
     
    256256  assert( status == E_ID );
    257257
    258   puts( "Init - ter_tsk - cannot terminate SELF (0) - E_OBJ" );
    259   status = ter_tsk( 0 );
     258  puts( "Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ" );
     259  status = ter_tsk( TSK_SELF );
    260260  assert( status == E_OBJ );
    261261
    262262  puts( "Init - ter_tsk - task is not DORMANT - E_OBJ" );
    263   status = ter_tsk( 1 );
     263  status = ter_tsk( PREEMPT_TASK_ID );
    264264  assert( status == E_OBJ );
    265265
     
    295295
    296296  /*  Call from task independent portion to cause E_OBJ
    297   puts( "Init - chg_pri - change priority of SELF - E_OBJ" );
    298   status = chg_pri( 0, 1 );
     297  puts( "Init - chg_pri - change priority of TSK_SELF - E_OBJ" );
     298  status = chg_pri( TSK_SELF, 1 );
    299299  assert( status == E_OBJ );
    300300  */
    301301
    302   /*  Need a dormant task to call
     302  /*  Need a dormant task to call */
    303303  puts( "Init - chg_pri - task is not DORMANT - E_OBJ" );
    304   status = chg_pri( 1, 1 );
    305   assert( status == E_OBJ );
    306   */
     304  status = chg_pri( PREEMPT_TASK_ID, 1 );
     305  assert( status == E_OBJ );
    307306
    308307  puts( "Init - chg_pri - task does not exist - E_NOEXS" );
     
    364363  /*  Call from task independent portion to cause E_ID
    365364  puts( "Init - ref_tsk - reference SELF - E_ID" );
    366   status = ref_tsk( &pk_rtsk, 0 );
     365  status = ref_tsk( &pk_rtsk, TSK_SELF );
    367366  assert( status == E_ID );
    368367  */
     
    400399
    401400  puts( "Init - sus_tsk - cannot suspend SELF - E_OBJ" );
    402   status = sus_tsk( 0 );
     401  status = sus_tsk( TSK_SELF );
    403402  assert( status == E_OBJ );
    404403
     
    434433
    435434  puts( "Init - rsm_tsk - cannot resume SELF - E_OBJ" );
    436   status = rsm_tsk( 0 );
     435  status = rsm_tsk( TSK_SELF );
    437436  assert( status == E_OBJ );
    438437
    439438  puts( "Init - rsm_tsk - task is DORMANT - E_OBJ" );
    440   status = rsm_tsk( 1 );
     439  status = rsm_tsk( PREEMPT_TASK_ID );
    441440  assert( status == E_OBJ );
    442441
     
    463462
    464463  puts( "Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ" );
    465   status = frsm_tsk( 0 );
     464  status = frsm_tsk( TSK_SELF );
    466465  assert( status == E_OBJ );
    467466
    468467  puts( "Init - frsm_tsk - task is DORMANT - E_OBJ" );
    469   status = frsm_tsk( 1 );
     468  status = frsm_tsk( PREEMPT_TASK_ID );
    470469  assert( status == E_OBJ );
    471470
Note: See TracChangeset for help on using the changeset viewer.