This repository has been archived on 2021-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
kaneton/kaneton/machine/architecture/ia32/educational/handler.c
Mercier Pierre-Olivier e9b620220e Events working
2013-02-17 06:17:41 +01:00

46 lines
918 B
C

/*
* ---------- header ----------------------------------------------------------
*
* project kaneton
*
* license kaneton
*
* file /home/mycure/kane.../architecture/ia32/educational/handler.c
*
* created renaud voltz [thu feb 23 10:49:43 2006]
* updated julien quintard [mon apr 11 13:44:48 2011]
*/
/*
* ---------- includes --------------------------------------------------------
*/
#include <kaneton.h>
/*
* ---------- functions -------------------------------------------------------
*/
/* FIXME[complete if necessary] */
void handler(int num)
{
o_event *irs;
if (event_exist(num) == ERROR_TRUE)
{
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);
}
}