3,6 → 3,7 |
#include <kernel/func.h> |
#include <ll/sys/ll/event.h> |
#include <ll/i386/pic.h> |
#include <tracer.h> |
|
#include <linuxcomp.h> |
|
21,6 → 22,7 |
int int_list[MAX_INT_LIST]; |
int next_free_int = 0; |
int next_execute_int = 0; |
int n_myact = 0, n_lost = 0; |
|
/* FIFO add job */ |
int add_interrupt_job(int no) |
28,6 → 30,8 |
|
int old_free_int = next_free_int; |
|
TRACER_LOGEVENT(FTrace_EVT_user_event_1, no, 0); |
|
int_list[next_free_int] = no; |
next_free_int++; |
|
34,6 → 38,7 |
if (next_free_int == MAX_INT_LIST) next_free_int = 0; |
if (next_free_int == next_execute_int) { |
next_free_int = old_free_int; |
n_lost++; |
return -1; |
} |
|
53,6 → 58,8 |
if (next_execute_int == MAX_INT_LIST) next_execute_int = 0; |
} |
|
TRACER_LOGEVENT(FTrace_EVT_user_event_2, res, 0); |
|
return res; |
|
} |
92,9 → 99,11 |
{ |
|
int no; |
|
|
while(1) { |
|
n_myact++; |
|
no = get_interrupt_job(); |
|
if (no != -1 && no < 16) { |