problem with tsk->mm in exit.c
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 likeif(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/