Changeset 50


Ignore:
Timestamp:
Sep 7, 2012, 12:47:18 PM (12 years ago)
Author:
ertl-hiro
Message:

ターゲット依存のエラーチェックコードを追加。

Location:
asp_wo_cfg/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • asp_wo_cfg/trunk/kernel/exception.c

    r49 r50  
    66 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    77 *                              Toyohashi Univ. of Technology, JAPAN
    8  *  Copyright (C) 2005-2011 by Embedded and Real-Time Systems Laboratory
     8 *  Copyright (C) 2005-2012 by Embedded and Real-Time Systems Laboratory
    99 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    1010 *
     
    122122                ercd = E_OBJ;
    123123        }
    124         else {
     124        else if ((ercd = target_check_dexc(excno, pk_dexc)) == E_OK) {
    125125                p_excinib->excatr = pk_dexc->excatr;
    126126                p_excinib->exchdr = pk_dexc->exchdr;
    127                 ercd = E_OK;
    128127        }
    129128
  • asp_wo_cfg/trunk/kernel/interrupt.c

    r49 r50  
    316316        p_intinib = get_intinib(intno);
    317317
    318         p_intinib->intatr = pk_cint->intatr;
    319         p_intinib->intpri = pk_cint->intpri;
    320         ercd = E_OK;
     318        if ((ercd = target_check_cint(intno, pk_cint)) == E_OK) {
     319                p_intinib->intatr = pk_cint->intatr;
     320                p_intinib->intpri = pk_cint->intpri;
     321        }
    321322
    322323  error_exit:
     
    351352                ercd = E_OBJ;
    352353        }
    353         else {
     354        else if ((ercd = target_check_dinh(inhno, pk_dinh)) == E_OK) {
    354355                p_inhinib->inhatr = pk_dinh->inhatr;
    355356                p_inhinib->inthdr = (IINTHDR)(pk_dinh->inthdr);
    356                 ercd = E_OK;
    357357        }
    358358
  • asp_wo_cfg/trunk/kernel/task_manage.c

    r49 r50  
    164164                        ercd = E_NOMEM;
    165165                }
    166                 else {
     166                else if ((ercd = target_check_ctsk(tskid, pk_ctsk)) == E_OK) {
    167167                        p_tinib = (TINIB *)(p_tcb->p_tinib);
    168168                        p_tinib->tskatr = tskatr;
     
    184184                                make_active(p_tcb);
    185185                        }
    186                         ercd = E_OK;
    187186                }
    188187        }
  • asp_wo_cfg/trunk/target/macosx_gcc/target_config.c

    r49 r50  
    396396
    397397/*
     398 *  サービスコールのターゲット依存エラーチェックコード
     399 */
     400ER
     401target_check_cint(INTNO intno, const T_CINT *pk_cint)
     402{
     403        if ((pk_cint->intatr & TA_EDGE) == 0U) {
     404                /*
     405                 *  レベルトリガはサポートしていない.
     406                 */
     407                return(E_RSATR);
     408        }
     409        else if (excinib_table[INDEX_INTNO(intno)].excatr != TA_NOEXS) {
     410                /*
     411                 *  CPU例外ハンドラが定義されたシグナルに対して,割込み要求ライ
     412                 *  ンの属性を設定しようとした場合は,E_OBJエラーとする.
     413                 */
     414                return(E_OBJ);
     415        }
     416        return(E_OK);
     417}
     418
     419ER
     420target_check_dexc(EXCNO excno, const T_DEXC *pk_dexc)
     421{
     422        if (intinib_table[INDEX_EXCNO(excno)].intatr != TA_NOEXS) {
     423                /*
     424                 *  割込み要求ラインの属性が設定されたシグナルに対して,CPU例外
     425                 *  ハンドラを定義しようとした場合は,E_OBJエラーとする.
     426                 */
     427                return(E_OBJ);
     428        }
     429        return(E_OK);
     430}
     431
     432/*
    398433 *  ターゲット依存の初期化
    399434 */
  • asp_wo_cfg/trunk/target/macosx_gcc/target_config.h

    r49 r50  
    533533
    534534/*
     535 *  サービスコールのターゲット依存エラーチェックコード
     536 */
     537Inline ER
     538target_check_ctsk(ID tskid, const T_CTSK *pk_ctsk)
     539{
     540        return(E_OK);
     541}
     542
     543extern ER target_check_cint(INTNO intno, const T_CINT *pk_cint);
     544
     545Inline ER
     546target_check_dinh(INHNO inhno, const T_DINH *pk_dinh)
     547{
     548        return(E_OK);
     549}
     550
     551extern ER target_check_dexc(EXCNO excno, const T_DEXC *pk_dexc);
     552
     553/*
    535554 *  ターゲットシステム依存の初期化
    536555 */
Note: See TracChangeset for help on using the changeset viewer.