X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/6de5c18959721ad99ff7ffdfd10e5a8038e8b133..cd29136f5e7d59be1b9868691436df0fb54d1ecd:/lincan/src/kthread.c diff --git a/lincan/src/kthread.c b/lincan/src/kthread.c index cce9ff5..ae43c30 100644 --- a/lincan/src/kthread.c +++ b/lincan/src/kthread.c @@ -1,5 +1,7 @@ -#include #include +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) +#include +#endif #if defined(MODVERSIONS) #include @@ -10,15 +12,21 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40)) #include #else - #include + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) + #include + #endif #endif #include #include #include +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) + #include +#else + #include +#endif -#include #include #include "../include/kthread.h" @@ -99,7 +107,7 @@ void stop_kthread(kthread_t *kthread) sema_init(&kthread->startstop_sem,0); /* We need to do a memory barrier here to be sure that - the flags are visible on all CPUs. + the flags are visible on all CPUs. */ mb(); @@ -107,7 +115,7 @@ void stop_kthread(kthread_t *kthread) kthread->terminate = 1; /* We need to do a memory barrier here to be sure that - the flags are visible on all CPUs. + the flags are visible on all CPUs. */ mb(); kill_proc(kthread->thread->pid, SIGKILL, 1);