⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.c

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 C
📖 第 1 页 / 共 2 页
字号:
  fatal_directive_status( status, E_ID, "ter_tsk of -2");  puts( "Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ" );  status = ter_tsk( TSK_SELF );  fatal_directive_status( status, E_OBJ, "ter_tsk of self");  puts( "Init - ter_tsk - task is not DORMANT - E_OBJ" );  status = ter_tsk( DORMANT_TASK_ID );  fatal_directive_status( status, E_OBJ, "ter_tsk DORMANT");  puts( "Init - ter_tsk - task does not exist - E_NOEXS" );  status = ter_tsk( 5 );  fatal_directive_status( status, E_NOEXS, "ter_tsk of 5");  puts( "Init - ter_tsk - access violation ( id less than -4) - E_OACV" );  status = ter_tsk( -5 );  fatal_directive_status( status, E_OACV, "ter_tsk of -5");#if (0)  /* these errors can not be generated for ter_tsk at this time */  fatal_directive_status( status, EN_OBJNO, "ter_tsk");  fatal_directive_status( status, EN_CTXID, "ter_tsk");#endif#if (0)  status = dis_dsp( );  fatal_directive_status( status, E_CTX, "dis_dsp");  status = ena_dsp( );  fatal_directive_status( status, E_CTX, "ena_dsp");#endif  puts( "\n\n*** Change Priority Task Errors ***" );  puts( "Init - chg_pri - bad id (between 0 and -4) - E_ID" );  status = chg_pri( -2, 1 );  fatal_directive_status( status, E_ID, "chg_pri of -2");  /*  Call from task independent portion to cause E_OBJ  puts( "Init - chg_pri - change priority of TSK_SELF - E_OBJ" );  status = chg_pri( XXX - INTERRUPT, 1 );  assert( status == E_OBJ );  */  puts( "Init - chg_pri - task is DORMANT - E_OBJ" );  status = chg_pri( DORMANT_TASK_ID, 1 );  fatal_directive_status( status, E_OBJ, "chg_pri of DORMANT");  puts( "Init - chg_pri - task does not exist - E_NOEXS" );  status = chg_pri( 5, 1 );  fatal_directive_status( status, E_NOEXS, "chg_pri of 5");  puts( "Init - chg_pri - access violation ( id less than -4) - E_OACV" );  status =  chg_pri( -5, 1 );  fatal_directive_status( status, E_OACV, "chg_pri of -5");  puts( "Init - chg_pri - invalid priority - E_PAR" );  status =  chg_pri( 1, -1 );  fatal_directive_status( status, E_PAR, "chg_pri with priority of -1");#if (0)  /* these errors can not be generated for chg_pri at this time */  fatal_directive_status( status, EN_OBJNO, "chg_pri");  fatal_directive_status( status, EN_CTXID, "chg_pri");  fatal_directive_status( status, EN_PAR, "chg_pri");#endif  /*  This gave me a nasty-gram   *  "core_find_mapping() - access to unmaped address, attach a default map   *   to handle this - addr=0x80002098 nr_bytes=0x4 processor=0x40134008   *   cia=0xc744"   */     puts( "\n\n*** Rotate Ready Queue Errors ***" );   puts( "Init - rot_rdq - priority  -1 - E_PAR" );   status = rot_rdq( -1 );   fatal_directive_status( status, E_PAR, "rot_rdq -1");   puts( "Init - rot_rdq - priority  257 - E_PAR" );   status = rot_rdq( 257 );   fatal_directive_status( status, E_PAR, "rot_rdq 256");  /* XXX - This routine is not coded */  puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OK" );  status = rel_wai( 1 );  fatal_directive_status( status, E_OK, "rel_wai");  puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_ID" );  status = E_ID;  fatal_directive_status( status, E_ID, "rel_wai");  puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_NOEXS" );  status = E_NOEXS;  fatal_directive_status( status, E_NOEXS, "rel_wai");  puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OACV" );  status = E_OACV;  fatal_directive_status( status, E_OACV, "rel_wai");  puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OBJ" );  status = E_OBJ;  fatal_directive_status( status, E_OBJ, "rel_wai");  puts( "Init - rel_rdq - XXX Add when rel_wai coded - EN_OBJNO" );  status = EN_OBJNO;  fatal_directive_status( status, EN_OBJNO, "rel_wai");  puts( "Init - rel_rdq - XXX Add when rel_wai coded - EN_CTXID" );  status = EN_CTXID;  fatal_directive_status( status, EN_CTXID, "rel_wai");  puts( "\n\n*** Reference Task Status Errors ***" );  puts( "Init - ref_tsk - bad id (between 0 and -4) - E_ID" );  status = ref_tsk( &pk_rtsk, -2 );  fatal_directive_status( status, E_ID, "ref_tsk -2");  /*  XXX Call from task independent portion to cause E_ID   puts( "Init - ref_tsk - reference INTERRUPT - E_ID" );  status = ref_tsk( &pk_rtsk, TSK_SELF );  assert( status == E_ID );  */  puts( "Init - ref_tsk - task does not exist - E_NOEXS" );  status = ref_tsk( &pk_rtsk, 5 );  fatal_directive_status( status, E_NOEXS, "ref_tsk 5");  puts( "Init - ref_tsk - access violation ( id less than -4) - E_OACV" );  status =  ref_tsk( &pk_rtsk, -5 );  fatal_directive_status( status, E_OACV, "ref_tsk -5");  puts( "Init - ref_tsk - packet address is bad - E_PAR" );  status =  ref_tsk( NULL, 1 );  fatal_directive_status( status, E_PAR, "ref_tsk SELF with NULL descriptor");#if (0)  /*  these errors can not be generated for ref_tsk at this time */  fatal_directive_status( status, EN_OBJNO, "ref_tsk");  fatal_directive_status( status, EN_CTXID, "ref_tsk");  fatal_directive_status( status, EN_RPAR, "ref_tsk");#endif  puts( "\n\n*** Suspend Task Errors ***" );  puts( "Init - sus_tsk - access violation ( id less than -4) - E_OACV" );  status = sus_tsk( -5 );  fatal_directive_status( status, E_OACV, "sus_tsk of -5");  puts( "Init - sus_tsk - bad id (between 0 and -4) - E_ID" );  status = sus_tsk( -2 );  fatal_directive_status( status, E_ID, "sus_tsk of -2");  puts( "Init - sus_tsk - cannot suspend SELF - E_OBJ" );  status = sus_tsk( TSK_SELF );  fatal_directive_status( status, E_OBJ, "sus_tsk of self");  puts( "Init - sus_tsk - task does not exist - E_NOEXS" );  status = sus_tsk( 5 );  fatal_directive_status( status, E_NOEXS, "sus_tsk of 5");  /* XXX - We support nested suspends and will never return this error.  puts( "Init - sus_tsk - no support for nested SUSPENDS - E_QOVR" );  status = sus_tsk( 1 );  fatal_directive_status( status, E_QOVR, "sus_tsk");  */  /* XXX - Can not test this.  puts( "Init - sus_tsk - exceeded limit for nested SUSPENDS - E_QOVR" );  status = sus_tsk( 1 );  fatal_directive_status( status, E_QOVR, "sus_tsk");  */#if (0)  /* these errors can not be generated for sus_tsk at this time */  fatal_directive_status( status, EN_OBJNO, "sus_tsk");  fatal_directive_status( status, EN_CTXID, "sus_tsk");#endif  puts( "\n\n*** Resume Task Errors ***" );  puts( "Init - rsm_tsk - access violation ( id less than -4) - E_OACV" );  status = rsm_tsk( -5 );  fatal_directive_status( status, E_OACV, "rsm_tsk -5");  puts( "Init - rsm_tsk - bad id (between 0 and -4) - E_ID" );  status = rsm_tsk( -2 );  fatal_directive_status( status, E_ID, "rsm_tsk -2");  puts( "Init - rsm_tsk - cannot resume SELF - E_OBJ" );  status = rsm_tsk( TSK_SELF );  fatal_directive_status( status, E_OBJ, "rsm_tsk self");  puts( "Init - rsm_tsk - task is DORMANT - E_OBJ" );  status = rsm_tsk( DORMANT_TASK_ID );  fatal_directive_status( status, E_OBJ, "rsm_tsk DORMANT");  puts( "Init - rsm_tsk - task is NON_DORMANT not suspended - E_OK" );  status = rsm_tsk( NON_DORMANT_TASK_ID );  fatal_directive_status( status, E_OK, "rsm_tsk NON_DORMANT");  puts( "Init - rsm_tsk - task does not exist - E_NOEXS" );  status = rsm_tsk( 5 );  fatal_directive_status( status, E_NOEXS, "rms_tsk 5");#if (0)  /* these errors can not be generated for rsm_tsk at this time */  fatal_directive_status( status, EN_OBJNO, "rsm_tsk");  fatal_directive_status( status, EN_CTXID, "rsm_tsk");#endif  puts( "\n\n*** Forcibly Resume Task Errors ***" );  puts( "Init - frsm_tsk - access violation ( id less than -4) - E_OACV" );  status = frsm_tsk( -5 );  fatal_directive_status( status, E_OACV, "frsm_tsk -5");  puts( "Init - frsm_tsk - bad id (between 0 and -4) - E_ID" );  status = frsm_tsk( -2 );  fatal_directive_status( status, E_ID, "frsm_tsk -2");  puts( "Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ" );  status = frsm_tsk( TSK_SELF );  fatal_directive_status( status, E_OBJ, "frsm_tsk self");  puts( "Init - frsm_tsk - task is DORMANT - E_OBJ" );  status = frsm_tsk( DORMANT_TASK_ID );  fatal_directive_status( status, E_OBJ, "frsm_tsk DORMANT");  puts( "Init - frsm_tsk - task does not exist - E_NOEXS" );  status = frsm_tsk( 5 );  fatal_directive_status( status, E_NOEXS, "frsm_tsk 5");  puts( "Init - frsm_tsk - task is NON_DORMANT not suspended - E_OK" );  status = frsm_tsk( NON_DORMANT_TASK_ID );  fatal_directive_status( status, E_OK, "frsm_tsk NON_DORMANT");#if (0)  /* these errors can not be generated for frsm_tsk at this time */  fatal_directive_status( status, EN_OBJNO, "frsm_tsk");  fatal_directive_status( status, EN_CTXID, "frsm_tsk");#endif#if (0)XXXXX - FIX ME  /* these directives are not coded */  slp_tsk( );  fatal_directive_status( status, E_OK, "");  fatal_directive_status( status, E_PAR, "");  fatal_directive_status( status, E_RLWAI, "");  fatal_directive_status( status, E_TMOUT, "");  fatal_directive_status( status, E_CTX, "");  tslp_tsk( TMO );  fatal_directive_status( status, E_OK, "");  fatal_directive_status( status, E_PAR, "");  fatal_directive_status( status, E_RLWAI, "");  fatal_directive_status( status, E_TMOUT, "");  fatal_directive_status( status, E_CTX, "");  wup_tsk( ID );  fatal_directive_status( status, E_OK, "");  fatal_directive_status( status, E_ID, "");  fatal_directive_status( status, E_NOEXS, "");  fatal_directive_status( status, E_OACV, "");  fatal_directive_status( status, E_OBJ, "");  fatal_directive_status( status, E_QOVR, "");  fatal_directive_status( status, EN_OBJNO, "");  fatal_directive_status( status, EN_CTXID, "");  can_tsk( INT, ID );  fatal_directive_status( status, E_OK, "");  fatal_directive_status( status, E_ID, "");  fatal_directive_status( status, E_NOEXS, "");  fatal_directive_status( status, E_OACV, "");  fatal_directive_status( status, E_OBJ, "");  fatal_directive_status( status, EN_OBJNO, "");  fatal_directive_status( status, EN_CTXID, "");  fatal_directive_status( status, EN_RPAR, "");#endif  puts( "*** END OF ITRON TASK TEST 2 ***" );  rtems_test_exit( 0 );}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -