linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* problem with tsk->mm in exit.c
@ 2005-01-11 10:59 sounak chakraborty
  0 siblings, 0 replies; only message in thread
From: sounak chakraborty @ 2005-01-11 10:59 UTC (permalink / raw)
  To: linux-kernel

  
  dear sir
i want to get the information when a thread gets
exited from the system .so i wrote some printk at the
beginning of do_exit in kernel/exit.c.like of
tsk->pid.
now as i have to check over there that it is kernel
thread or user thread so i am putting a if statement
like
if(tsk->flags & CLONE_VM)  //for the checking of
threads
  {
     if(tsk->mm==NULL)   //for the checking of kernel
threads
      printk(kernel thread exiting);
     else
      printk(user thread exiting);
    }
but here aises the problem when i have finished
compilling the output shows every thread as user.i.e
"user thread exiting

that means in somewhere after do_fork in
/kernel/fork.c
the p->mm is getting filled in case of kernel thread.
so is there any other way so that i can distinguish
between
the user level and kernel level in do_exit()in
/kernel/exit.c
or i have to place my sample code in somewhere else 
so that i can find the values while terminating the
threads with the proper distinction between user level
threads and kernel level threads

thanks in advance
sounak 


________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-11 10:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11 10:59 problem with tsk->mm in exit.c sounak chakraborty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).