7 #include <native/task.h>
8 #include <native/timer.h>
9 #include <native/intr.h>
17 void lpt1_handler(void *arg
)
20 rt_intr_create(&intr
, "lpt1 handler", LPT1IRQ
, 0);
23 rt_printf("lpt1 interrupt: %d\n",
24 bps
+= rt_intr_wait(&intr
, TM_INFINITE
));
28 int main(int argc
, char* argv
[])
30 rt_print_auto_init(1);
34 unsigned char byte
= inb(0x37A);
38 mlockall(MCL_CURRENT
| MCL_FUTURE
);
40 rt_task_create(&task
, "task", 0, 50, 0);
41 rt_task_start(&task
, &lpt1_handler
, 0);
43 rt_printf("CRTL+C to stop\n");