http://art-linux.sourceforge.net/Там ваще ничего переделывать особо не надо, только 2 типа и 5 функций.
art_prio_t
art_flags_t
int art_enter(art_prio_t prio, art_flags_t flags, int usec)
int art_wait(void)
int art_exit(void)
int art_wait_phase(unsigned long usec, art_prio_t prio)
int art_yield(void)
#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>
#include <linux/art_task.h>#define TRUE 1
#define KBD_PORT 0x61
#define SPK_BIT 0x02
main(int argc, char *argv[])
{
int temp, hz, i;
hz = atoi(argv[1]);
ioperm(KBD_PORT, 1, TRUE);
art_enter(ART_PRIO_MAX, ART_TASK_PERIODIC, 500000 / hz);
for (i = 0; i < hz * 5; ++i) {
art_wait();
temp = inb(KBD_PORT);
temp = (i & 1) ? temp | SPK_BIT : temp & ~SPK_BIT;
outb(temp, KBD_PORT);
}
art_exit();
}