Wait for test server
This commit is contained in:
parent
e9b620220e
commit
5fdea0dabd
@ -31,15 +31,8 @@ void handler(int num)
|
|||||||
event_get(num, &irs);
|
event_get(num, &irs);
|
||||||
irs->handler.routine(irs->id, irs->data);
|
irs->handler.routine(irs->id, irs->data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void handler_err(int err, int num)
|
if (num >= ARCHITECTURE_IDT_IRQ_BASE &&
|
||||||
{
|
num < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE)
|
||||||
o_event *irs;
|
platform_pic_acknowledge(num - ARCHITECTURE_IDT_IRQ_BASE);
|
||||||
|
|
||||||
if (event_exist(num) == ERROR_TRUE)
|
|
||||||
{
|
|
||||||
event_get(num, &irs);
|
|
||||||
irs->handler.routine(irs->id, irs->data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -22,16 +22,16 @@ do
|
|||||||
echo " push %fs" >> $FILEOUT
|
echo " push %fs" >> $FILEOUT
|
||||||
echo " push %gs" >> $FILEOUT
|
echo " push %gs" >> $FILEOUT
|
||||||
echo " push %ss" >> $FILEOUT
|
echo " push %ss" >> $FILEOUT
|
||||||
echo " push \$$i" >> $FILEOUT
|
|
||||||
|
|
||||||
if [ $i -eq 8 ] || [ $i -eq 17 ] || ( [ $i -ge 10 ] && [ $i -lt 15 ])
|
echo " mov \$0x10, %ax" >> $FILEOUT
|
||||||
then
|
echo " mov %ax, %ds" >> $FILEOUT
|
||||||
echo " push \$0" >> $FILEOUT
|
echo " mov %ax, %es" >> $FILEOUT
|
||||||
echo " call handler_err" >> $FILEOUT
|
echo " mov %ax, %fs" >> $FILEOUT
|
||||||
echo " pop %ebx" >> $FILEOUT
|
echo " mov %ax, %gs" >> $FILEOUT
|
||||||
else
|
echo " mov %ax, %ss" >> $FILEOUT
|
||||||
echo " call handler" >> $FILEOUT
|
|
||||||
fi
|
echo " push \$$i" >> $FILEOUT
|
||||||
|
echo " call handler" >> $FILEOUT
|
||||||
echo " pop %ebx" >> $FILEOUT
|
echo " pop %ebx" >> $FILEOUT
|
||||||
echo " pop %ss" >> $FILEOUT
|
echo " pop %ss" >> $FILEOUT
|
||||||
echo " pop %gs" >> $FILEOUT
|
echo " pop %gs" >> $FILEOUT
|
||||||
@ -39,6 +39,10 @@ do
|
|||||||
echo " pop %es" >> $FILEOUT
|
echo " pop %es" >> $FILEOUT
|
||||||
echo " pop %ds" >> $FILEOUT
|
echo " pop %ds" >> $FILEOUT
|
||||||
echo " popa" >> $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 " sti" >> $FILEOUT
|
||||||
echo " iret" >> $FILEOUT
|
echo " iret" >> $FILEOUT
|
||||||
echo "" >> $FILEOUT
|
echo "" >> $FILEOUT
|
||||||
|
@ -55,8 +55,6 @@
|
|||||||
|
|
||||||
void handler(int num);
|
void handler(int num);
|
||||||
|
|
||||||
void handler_err(int err, int num);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* eop
|
* eop
|
||||||
|
@ -39,8 +39,8 @@ d_event glue_event_dispatch =
|
|||||||
NULL,
|
NULL,
|
||||||
glue_event_enable,
|
glue_event_enable,
|
||||||
glue_event_disable,
|
glue_event_disable,
|
||||||
NULL,
|
glue_event_reserve,
|
||||||
NULL,
|
glue_event_release,
|
||||||
glue_event_initialize,
|
glue_event_initialize,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@ -65,6 +65,28 @@ t_error glue_event_disable(void)
|
|||||||
MACHINE_LEAVE();
|
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_error glue_event_initialize(void)
|
||||||
{
|
{
|
||||||
t_uint16 i;
|
t_uint16 i;
|
||||||
|
@ -79,6 +79,13 @@ t_error glue_event_enable(void);
|
|||||||
|
|
||||||
t_error glue_event_disable(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);
|
t_error glue_event_initialize(void);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user