/shark/trunk/drivers/linuxc26/shark_glue.c |
---|
3,8 → 3,6 |
#include <kernel/func.h> |
#include <ll/sys/ll/event.h> |
#include <linuxcomp.h> |
PID intr_server = NIL; |
#define MAX_INT_LIST 50 |
11,9 → 9,9 |
/* 1-15 for IRQ and 16-63 for timers */ |
void *int_arg_table[MAX_INT_TABLE]; |
void *int_func_table[MAX_INT_TABLE]; |
int timer_table[MAX_INT_TABLE]; |
void *int_arg_table[64]; |
void *int_func_table[64]; |
int timer_table[64]; |
int int_list[MAX_INT_LIST]; |
int next_free_int = 0; |
60,7 → 58,7 |
int i = 16; |
while(timer_table[i] != -1) |
if (i < MAX_INT_TABLE) i++; else return -1; |
if (i < 64) i++; else return -1; |
return i; |
103,7 → 101,7 |
HARD_TASK_MODEL ht; |
int i; |
for(i=0;i<MAX_INT_TABLE;i++) { |
for(i=0;i<64;i++) { |
int_arg_table[i] = NULL; |
int_func_table[i] = NULL; |
timer_table[i] = -1; |
186,7 → 184,7 |
f = kern_fsave(); |
if (index <= 0 || index >= MAX_INT_TABLE) { |
if (index <= 0 || index >= 64) { |
kern_frestore(f); |
return -1; |
} |
/shark/trunk/drivers/linuxc26/timer.c |
---|
16,8 → 16,8 |
value->tv_sec = j / HZ; |
} |
extern void *int_arg_table[MAX_INT_TABLE]; |
extern void *int_func_table[MAX_INT_TABLE]; |
extern void *int_arg_table[64]; |
extern void *int_func_table[64]; |
extern int intr_count; |
/* |
/shark/trunk/drivers/linuxc26/int.c |
---|
4,8 → 4,8 |
#include <asm-generic/errno-base.h> |
#include <linux/kernel.h> |
extern void *int_arg_table[MAX_INT_TABLE]; |
extern void *int_func_table[MAX_INT_TABLE]; |
extern void *int_arg_table[64]; |
extern void *int_func_table[64]; |
int intr_count = 0; |
/* |
/shark/trunk/drivers/linuxc26/include/linuxcomp.h |
---|
52,13 → 52,11 |
extern TIME sys_gettime(struct timespec *t); |
#define MAX_INT_TABLE 64 /* Shark_glue table for interrupt and timers */ |
#define jiffies26 (sys_gettime(NULL)*HZ/1000000) /* Has to be controlled... */ |
//#define jiffies26 (TIME)0 |
/* Timer Manager */ |
int shark_timer_set(const struct timespec *time, void *handler, void *arg); |
int shark_timer_set(struct timespec *time, void *handler, void *arg); |
int shark_timer_delete(int index); |
/* Interrupt handler installation and removal */ |