gonzui


Format: Advanced Search

mtkernel_3/kernel/tkernel/int.cbare sourcepermlink (0.02 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    micro T-Kernel 3.00.00
    4:  *
    5:  *    Copyright (C) 2006-2019 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.1.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2019/12/11.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: /*
   15:  *      int.c
   16:  *      Interrupt Control
   17:  */
   18: 
   19: #include "kernel.h"
   20: #include "check.h"
   21: 
   22: /* ------------------------------------------------------------------------ */
   23: /*
   24:  * Interrupt handler definition
   25:  */
   26: SYSCALL ER tk_def_int( UINT intno, CONST T_DINT *pk_dint )
   27: {
   28: #if USE_STATIC_IVT
   29:         return E_NOSPT;
   30: #else
   31:         ATR    intatr;
   32:         FP     inthdr;
   33:         ER     ercd;
   34: 
   35:         CHECK_PAR(intno < N_INTVEC);
   36:         if(pk_dint != NULL) {
   37:                 CHECK_RSATR(pk_dint->intatr, TA_HLNG|TA_ASM);
   38:                 intatr        = pk_dint->intatr;
   39:                 inthdr        = pk_dint->inthdr;
   40:         } else {
   41:                 intatr        = 0;
   42:                 inthdr        = NULL;
   43:         }
   44: 
   45:         BEGIN_CRITICAL_SECTION;
   46:         ercd = knl_define_inthdr(intno, intatr, inthdr);
   47:         END_CRITICAL_SECTION;
   48: 
   49:         return ercd;
   50: #endif
   51: }
   52: 
   53: /* ------------------------------------------------------------------------ */
   54: /*
   55:  * return Interrupt handler
   56:  */
   57: SYSCALL void tk_ret_int( void )
   58: {
   59:         knl_return_inthdr();
   60:         return;
   61: }
   62: