OSDN Git Service

debug MicroBlaze
[hos/hos-v4a.git] / kernel / source / object / isr / exe_isr.c
1 /** 
2  *  Hyper Operating System V4 Advance
3  *
4  * @file  exe_int.c
5  * @brief %jp{割込みの処理}
6  *
7  * Copyright (C) 1998-2006 by Project HOS
8  * http://sourceforge.jp/projects/hos/
9  */
10
11
12 #include "core/core.h"
13 #include "object/isrobj.h"
14
15
16 #if _KERNEL_SPT_ISR
17
18 /* %jp{割込みの処理} */
19 void _kernel_exe_isr(INTNO intno)
20 {
21         _KERNEL_T_ISRCB_RO_PTR isrcb_ro;
22         _KERNEL_T_ISRCB_PTR    isrcb;
23         _KERNEL_T_ISRHDL       isrhdl;
24         
25         isrhdl = _KERNEL_INT_GET_HEAD(intno);
26
27         /* %jp{ISRのフック} */
28 #if _KERNEL_SPT_HOK_ISRSTA
29         _kernel_isr_sta(intno);
30 #endif
31         
32         while ( isrhdl != _KERNEL_ISRHDL_NULL )
33         {
34                 isrcb    = _KERNEL_ISR_ISRHDL2ISRCB(isrhdl);
35                 isrcb_ro = _KERNEL_ISR_ISRHDL2ISRCBRO(isrhdl);
36                 
37 #if _KERNEL_PROCATR_SPT_MULTINT
38                 _KERNEL_ENA_INT();                      /* %jp{多重割込み許可} */
39 #endif
40                 _KERNEL_ISR_GET_ISR(isrcb_ro)(_KERNEL_ISR_GET_EXINF(isrcb_ro));
41                 
42 #if _KERNEL_PROCATR_SPT_MULTINT
43                 _KERNEL_DIS_INT();                      /* %jp{割込み禁止} */
44 #endif
45                 
46                 isrhdl = _KERNEL_ISR_GET_NEXT(isrcb);
47         }
48         
49         /* %jp{ISRのフック} */
50 #if _KERNEL_SPT_HOK_ISREND
51         _kernel_isr_end(intno);
52 #endif
53 }
54
55 #endif
56
57
58 /* end of file */