From: ppisa Date: Sun, 2 Nov 2008 11:59:16 +0000 (+0100) Subject: Merge branch 'master' into can-usb1 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/fb1e8444b02cd7ae2536adc1bad79f5e01382767?hp=ab5f414f57a41d64ce202bfc90b847a78c444e82 Merge branch 'master' into can-usb1 --- diff --git a/lincan/Makefile.omk b/lincan/Makefile.omk index f268924..d43b19d 100644 --- a/lincan/Makefile.omk +++ b/lincan/Makefile.omk @@ -1,2 +1,2 @@ -SUBDIRS = src +SUBDIRS = src utils diff --git a/lincan/src/kthread.c b/lincan/src/kthread.c index ae43c30..a1563ce 100644 --- a/lincan/src/kthread.c +++ b/lincan/src/kthread.c @@ -118,7 +118,13 @@ void stop_kthread(kthread_t *kthread) the flags are visible on all CPUs. */ mb(); +#warning The local code for kernel thread support is not more needed for recent 2.6 kernels +#warning and code should be modified to emulate same interface for older kernels +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) kill_proc(kthread->thread->pid, SIGKILL, 1); +#else /* >= 2,6,20 */ + send_sig(SIGKILL, kthread->thread, 1); +#endif /* >= 2,6,20 */ /* block till thread terminated */ down(&kthread->startstop_sem); @@ -129,7 +135,9 @@ void stop_kthread(kthread_t *kthread) /* now we are sure the thread is in zombie state. We notify keventd to clean the process up. */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) kill_proc(2, SIGCHLD, 1); +#endif /* >= 2,6,20 */ }