[PATCH] [30/34] i386: convert the monitor thread to use the kthread API
- From: Andi Kleen <ak@xxxxxxx>
- Date: Mon, 30 Apr 2007 17:50:03 +0200 (CEST)
From: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
This patch just trivially replaces kernel_thread and daemonize with a
single call to kthread_run.
Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---
arch/i386/mach-voyager/voyager_thread.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: linux/arch/i386/mach-voyager/voyager_thread.c
===================================================================
--- linux.orig/arch/i386/mach-voyager/voyager_thread.c
+++ linux/arch/i386/mach-voyager/voyager_thread.c
@@ -24,6 +24,7 @@
#include <linux/kmod.h>
#include <linux/completion.h>
#include <linux/sched.h>
+#include <linux/kthread.h>
#include <asm/desc.h>
#include <asm/voyager.h>
#include <asm/vic.h>
@@ -44,7 +45,7 @@ static __u8 set_timeout = 0;
static int __init
voyager_thread_start(void)
{
- if(kernel_thread(thread, NULL, CLONE_KERNEL) < 0) {
+ if (IS_ERR(kthread_run(thread, NULL, "%s", THREAD_NAME))) {
/* This is serious, but not fatal */
printk(KERN_ERR "Voyager: Failed to create system monitor thread!!!\n");
return 1;
@@ -123,8 +124,6 @@ thread(void *unused)
kvoyagerd_running = 1;
- daemonize(THREAD_NAME);
-
set_timeout = 0;
init_timer(&wakeup_timer);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] [30/34] i386: convert the monitor thread to use the kthread API
- From: James Bottomley
- Re: [PATCH] [30/34] i386: convert the monitor thread to use the kthread API
- References:
- Prev by Date: [PATCH] [29/34] i386: pte simplify ops
- Next by Date: [PATCH] [25/34] x86_64: skip cache_free_alien() on non NUMA
- Previous by thread: [PATCH] [29/34] i386: pte simplify ops
- Next by thread: Re: [PATCH] [30/34] i386: convert the monitor thread to use the kthread API
- Index(es):
Relevant Pages
- [RFC][PATCH 12/12] generic timeofday i386/x86-64 specific clocksources
... The patch should apply on top of the ... +static int __init init_hpet_clocksource
... +static struct clocksource clocksource_pit = { ... (Linux-Kernel) - Re: [x86] is checkpatch.pl broken
... (I added two more small cleanups that checkpatch did not ... This patch
eliminates checkpatch.pl complaints on bootflag.c ... static void __init sbf_write ...
static int __init sbf_init ... (Linux-Kernel) - [patch] ACPI NUMA quiet printk and cleanup
... ACPI printk's into ACPI debug messages thgat only shows when ... The patch
should be very easy to verify - compiled and booted on an sn2. ... static int __init ...
(Linux-Kernel) - [RFC: 2.6 patch] unexport do_settimeofday
... Is the patch below correct? ... static int sbus_do_settimeofday ...
void __init dec_timer_setup ... These routines returns the time duration ...
(Linux-Kernel) - Re: Patch to add support for SGIs IOC4 chipset
... Attached is a new patch which takes into account the comments on the earlier ...
>You can print revision number during init. ... +static int n_sgiioc4_devs; ...
+static void __init ... (Linux-Kernel)