-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterrupt.h
More file actions
28 lines (23 loc) · 743 Bytes
/
interrupt.h
File metadata and controls
28 lines (23 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _INTERRUPT_H_
#define _INTERRUPT_H_
#include <stdio.h>
#include <signal.h>
#define TBD() do { \
printf("%s:%d: %s: please implement this functionality\n", \
__FILE__, __LINE__, __FUNCTION__); \
exit(1); \
} while (0)
/* we will use this signal type for delivering "interrupts". */
#define SIG_TYPE SIGALRM
/* the interrupt will be delivered every 200 usec */
#define SIG_INTERVAL 200
void register_interrupt_handler(int verbose);
int interrupts_on(void);
int interrupts_off(void);
int interrupts_set(int enabled);
int interrupts_enabled();
void interrupts_quiet();
void spin(int msecs);
/* turn off interrupts while printing */
int unintr_printf(const char *fmt, ...);
#endif