mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: vinay hegde <thisismevinay@yahoo.co.in>
To: linux-kernel@vger.kernel.org
Cc: thisismevinay@yahoo.co.in
Subject: Need help regarding kernel threads
Date: Tue, 2 Aug 2005 09:57:51 +0100 (BST)	[thread overview]
Message-ID: <20050802085751.55408.qmail@web8407.mail.in.yahoo.com> (raw)

Hi,

Can sombody help me with the following:

How to differentiate kernel threads from normal
processes inside the Linux kernel code? 

I want to handle all the processes headed by "init_ 
task", in such a way that kernel threads are excluded
in the special processing. But , I am not able to find
out a kernel data structure which helps me in
identifying whether the "task_struct" is a normal
process or a kernel thread.

For ex, if i use the following snippet of code,

 for(p=&init_task; (p=next_task(p)) != &init_task;)
 {
        printk("%s\n", p->comm);
 } 

it prints all the processes running including kernel
threads(init, keventd, kswapd etc etc). Now, I want to
check whether the "task_struct" is a process or a
kernel thread? 

How do I handle processes seperately from kernel
threads??

Thank you,
Vinay.


		
_______________________________________________________
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com

             reply	other threads:[~2005-08-02  8:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-02  8:57 vinay hegde [this message]
2005-08-02  9:22 ` Keith Owens

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=20050802085751.55408.qmail@web8407.mail.in.yahoo.com \
    --to=thisismevinay@yahoo.co.in \
    --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®