From f0139b9010b406c560ed6c190796e434943b5d25 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Mon, 19 Jan 2009 13:45:31 +0100 Subject: [PATCH] --- yaml --- r: 131120 b: refs/heads/master c: 86532d8b167e71e24da8b564348b52977b76d15f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/async.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5196992a509e..a417eb45317f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7a89bbc74937cd74a6bcf109cfc7c032109639be +refs/heads/master: 86532d8b167e71e24da8b564348b52977b76d15f diff --git a/trunk/kernel/async.c b/trunk/kernel/async.c index 0c90d500ab68..078d5ed150d1 100644 --- a/trunk/kernel/async.c +++ b/trunk/kernel/async.c @@ -54,6 +54,7 @@ asynchronous and synchronous parts of the kernel. #include #include #include +#include #include static async_cookie_t next_cookie = 1; @@ -319,7 +320,11 @@ static int async_manager_thread(void *unused) ec = atomic_read(&entry_count); while (tc < ec && tc < MAX_THREADS) { - kthread_run(async_thread, NULL, "async/%i", tc); + if (IS_ERR(kthread_run(async_thread, NULL, "async/%i", + tc))) { + msleep(100); + continue; + } atomic_inc(&thread_count); tc++; } @@ -334,7 +339,9 @@ static int async_manager_thread(void *unused) static int __init async_init(void) { if (async_enabled) - kthread_run(async_manager_thread, NULL, "async/mgr"); + if (IS_ERR(kthread_run(async_manager_thread, NULL, + "async/mgr"))) + async_enabled = 0; return 0; }