Wait for test server

This commit is contained in:
Mercier Pierre-Olivier 2013-02-17 07:51:23 +01:00
parent e9b620220e
commit 5fdea0dabd
6 changed files with 1597 additions and 44 deletions

View File

@ -31,15 +31,8 @@ void handler(int num)
event_get(num, &irs);
irs->handler.routine(irs->id, irs->data);
}
}
void handler_err(int err, int num)
{
o_event *irs;
if (event_exist(num) == ERROR_TRUE)
{
event_get(num, &irs);
irs->handler.routine(irs->id, irs->data);
}
if (num >= ARCHITECTURE_IDT_IRQ_BASE &&
num < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE)
platform_pic_acknowledge(num - ARCHITECTURE_IDT_IRQ_BASE);
}

File diff suppressed because it is too large Load Diff

View File

@ -22,16 +22,16 @@ do
echo " push %fs" >> $FILEOUT
echo " push %gs" >> $FILEOUT
echo " push %ss" >> $FILEOUT
echo " push \$$i" >> $FILEOUT
if [ $i -eq 8 ] || [ $i -eq 17 ] || ( [ $i -ge 10 ] && [ $i -lt 15 ])
then
echo " push \$0" >> $FILEOUT
echo " call handler_err" >> $FILEOUT
echo " pop %ebx" >> $FILEOUT
else
echo " call handler" >> $FILEOUT
fi
echo " mov \$0x10, %ax" >> $FILEOUT
echo " mov %ax, %ds" >> $FILEOUT
echo " mov %ax, %es" >> $FILEOUT
echo " mov %ax, %fs" >> $FILEOUT
echo " mov %ax, %gs" >> $FILEOUT
echo " mov %ax, %ss" >> $FILEOUT
echo " push \$$i" >> $FILEOUT
echo " call handler" >> $FILEOUT
echo " pop %ebx" >> $FILEOUT
echo " pop %ss" >> $FILEOUT
echo " pop %gs" >> $FILEOUT
@ -39,6 +39,10 @@ do
echo " pop %es" >> $FILEOUT
echo " pop %ds" >> $FILEOUT
echo " popa" >> $FILEOUT
if [ $i -eq 8 ] || [ $i -eq 17 ] || ( [ $i -ge 10 ] && [ $i -lt 15 ])
then
echo " add \$4, %esp" >> $FILEOUT
fi
echo " sti" >> $FILEOUT
echo " iret" >> $FILEOUT
echo "" >> $FILEOUT

View File

@ -55,8 +55,6 @@
void handler(int num);
void handler_err(int err, int num);
/*
* eop

View File

@ -39,8 +39,8 @@ d_event glue_event_dispatch =
NULL,
glue_event_enable,
glue_event_disable,
NULL,
NULL,
glue_event_reserve,
glue_event_release,
glue_event_initialize,
NULL
};
@ -65,6 +65,28 @@ t_error glue_event_disable(void)
MACHINE_LEAVE();
}
t_error glue_event_reserve(i_event id,
t_type type,
u_event_handler h,
t_data data)
{
if (id >= ARCHITECTURE_IDT_IRQ_BASE &&
id < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE)
platform_pic_enable(id - ARCHITECTURE_IDT_IRQ_BASE);
MACHINE_LEAVE();
}
t_error glue_event_release(i_event id)
{
if (id >= ARCHITECTURE_IDT_IRQ_BASE &&
id < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE)
platform_pic_disable(id - ARCHITECTURE_IDT_IRQ_BASE);
MACHINE_LEAVE();
}
t_error glue_event_initialize(void)
{
t_uint16 i;

View File

@ -79,6 +79,13 @@ t_error glue_event_enable(void);
t_error glue_event_disable(void);
t_error glue_event_reserve(i_event id,
t_type type,
u_event_handler h,
t_data data);
t_error glue_event_release(i_event id);
t_error glue_event_initialize(void);