Revision 8
Final - macros
timer.c | ||
---|---|---|
58 | 58 |
/* int policy; |
59 | 59 |
sys_irqrmpolicy(&policy); */ |
60 | 60 |
hook_id=*bit_no; |
61 |
if(sys_irqsetpolicy(IRQ_TIMER,IRQ_REENABLE,&hook_id)!=0) return 1;
|
|
61 |
sys_irqsetpolicy(IRQ_TIMER,IRQ_REENABLE,&hook_id);
|
|
62 | 62 |
|
63 |
return 0;
|
|
63 |
return 1;
|
|
64 | 64 |
} |
65 | 65 |
|
66 | 66 |
int (timer_unsubscribe_int)() { |
67 | 67 |
/* To be implemented by the students */ |
68 | 68 |
// printf("%s is not yet implemented!\n", __func__); |
69 | 69 |
|
70 |
if(sys_irqrmpolicy(&hook_id)!=0) return 1;
|
|
70 |
sys_irqrmpolicy(&hook_id);
|
|
71 | 71 |
|
72 |
return 0;
|
|
72 |
return 1;
|
|
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
void (timer_int_handler)() { |
Also available in: Unified diff