At Clock_exit, mask timer interrupts instead of just disabling them

This commit is contained in:
afpr
2014-04-08 15:32:17 +01:00
parent 4dffafe05d
commit feca1197a1
3 changed files with 15 additions and 1 deletions

View File

@@ -378,6 +378,10 @@ void Install_clock(
void Clock_exit( void )
{
/* mask interrupt */
intr_mask(EXC_INTR_USEC);
/* turn off the timer interrupts */
patmos_disable_interrupts();

View File

@@ -55,9 +55,17 @@ void intr_clear_all_pending(void){
}
/*
* Unmask a particular interrupts
* Unmask a particular interrupt
* n - The interrupt to be unmasked
*/
void intr_unmask(unsigned n){
EXC_MASK |= (1 << n);
}
/*
* Mask a particular interrupt
* n - The interrupt to be masked
*/
void intr_mask(unsigned n){
EXC_MASK &= ~(1 << n);
}

View File

@@ -42,6 +42,8 @@ void intr_clear_all_pending(void);
void intr_unmask(unsigned n);
void intr_mask(unsigned n);
#endif
/* end of include file */