Re: kernel thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Fawad Latef,


>I want to distinguish between a kernel thread and a normal user process >in
my KLM.

I got it, If the mm field in the of the process is null then it's a kernel
thread.


Yes, but keep in mind you can't say that mm of the kernel thread is
always NULL as if the kernel thread won't call daemonize then the mm
will be there (some one CMIIW) .

A kernel thread does not have a process address space,
it runs in the address space of the process which was running just before the kernel thread was started. That's whay in the task structure the mm field is NULL. This mm field defines the process address space of a process.

Thanks,
Saumendra



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux