Project

General

Profile

Revision 3

returns sys

View differences:

timer.c
58 58
 /*  int policy;
59 59
  sys_irqrmpolicy(&policy); */
60 60
  hook_id=*bit_no;
61
  sys_irqsetpolicy(IRQ_TIMER,IRQ_REENABLE,&hook_id);
61
  if(sys_irqsetpolicy(IRQ_TIMER,IRQ_REENABLE,&hook_id)!=0) return 1;
62 62

  
63
  return 1;
63
  return 0;
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
sys_irqrmpolicy(&hook_id);
70
  if(sys_irqrmpolicy(&hook_id)!=0) return 1;
71 71

  
72
  return 1;
72
  return 0;
73 73
}
74 74

  
75 75
void (timer_int_handler)() {

Also available in: Unified diff