mtkernel_3/include/tk/sysdepend/cpu/core/rxv2/syslib.h | bare source | permlink (0.00 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * micro T-Kernel 3.00.01 4: * 5: * Copyright (C) 2006-2020 by Ken Sakamura. 6: * This software is distributed under the T-License 2.2. 7: *---------------------------------------------------------------------- 8: * 9: * Released by TRON Forum(http://www.tron.org) at 2020/05/29. 10: * 11: *---------------------------------------------------------------------- 12: */ 13: 14: /* 15: * syslib.h 16: * 17: * micro T-Kernel System Library (RXv2 core depended) 18: */ 19: 20: #ifndef __TK_SYSLIB_DEPEND_CORE_H__ 21: #define __TK_SYSLIB_DEPEND_CORE_H__ 22: 23: #include <tk/errno.h> 24: #include <sys/sysdef.h> 25: 26: /*----------------------------------------------------------------------*/ 27: /* 28: * CPU interrupt control for RXv2 29: * 'intsts' is the value of PSW register in CPU 30: * disint() Set PSW.IPL value to 15. And return the original PSW.IPL value. 31: * setint() Set PSW.IPL value to ipl. 32: */ 33: IMPORT UW disint( void ); 34: IMPORT void setint( UW intsts ); 35: 36: #define INTLEVEL_DI (15) 37: #define INTLEVEL_EI (0) 38: 39: #define DI(intsts) ( (intsts) = disint() ) 40: #define EI(intsts) ( setint(intsts) ) 41: #define isDI(intsts) ( (intsts) == INTLEVEL_DI ) 42: 43: /* 44: * Convert to interrupt definition number 45: * 46: * For backward compatibility. 47: * INTVEC has been obsoleted since micro T-Kernel 2.0. 48: */ 49: #define DINTNO(intvec) (intvec) 50: 51: #endif /* __TK_SYSLIB_DEPEND_CORE_H__ */