-#include <linux/config.h>
#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
+#include <linux/config.h>
+#endif
#if defined(MODVERSIONS)
#include <linux/modversions.h>
#include <linux/signal.h>
#include <linux/interrupt.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
+ #include <asm/semaphore.h>
+#else
+ #include <linux/semaphore.h>
+#endif
-#include <asm/semaphore.h>
#include <linux/smp_lock.h>
#include "../include/kthread.h"
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();
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);