Revision 42
changed counter
utils.c | ||
---|---|---|
2 | 2 |
|
3 | 3 |
#include <stdint.h> |
4 | 4 |
|
5 |
#ifdef LAB3 |
|
6 |
uint32_t sys_inb_counter = 0; |
|
7 |
#endif |
|
8 |
|
|
5 | 9 |
int (util_sys_inb)(int port, uint8_t *value) { |
6 | 10 |
if(value == NULL) return 1; |
7 | 11 |
uint32_t n = 0; |
8 | 12 |
if(sys_inb(port, &n)) return 1; |
9 | 13 |
*value = n; |
14 |
#ifdef LAB3 |
|
15 |
++sys_inb_counter; |
|
16 |
#endif |
|
10 | 17 |
return 0; |
11 | 18 |
} |
Also available in: Unified diff