Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 525 → Rev 526

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