From: "James Yu" <cyu021@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Kernel thread removal
Date: Thu, 23 Feb 2006 01:00:34 +0800 [thread overview]
Message-ID: <60bb95410602220900n440564d7xb459d47c8ca30997@mail.gmail.com> (raw)
How do I remove a kernel thread in kernel mode ?
I write a C-function in one of the Linux source files and create a
kernel thread by invoking kernel_thread() to run the function, like:
"kernel_thread(a1, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);"
Function a1 simply invokes printk() to output some message on console.
I invoke do_exit(0); at the end of a1, but a1's task_struct still
exists in in task_struct list after its execution.
How do I remove it a1's task_struct upon its completion? I thought
explicitly invoke do_exit() ensures the removal of task_struct?
next reply other threads:[~2006-02-22 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 17:00 James Yu [this message]
2006-02-22 17:45 ` linux-os (Dick Johnson)
2006-02-22 17:56 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60bb95410602220900n440564d7xb459d47c8ca30997@mail.gmail.com \
--to=cyu021@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®