Re: Fw: TASK_EXCLUSIVE undelared ?

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

 



On Sat, Jan 24, 2004 at 16:38:27 +0100, Anup Patil wrote:
> 
> ----- Original Message -----
> From: "Muthukumar Ratty" <muthu@iqmail.net>
> To: "Anup Patil" <patil_a@etech.haw-hamburg.de>
> Cc: <kernelnewbies@nl.linux.org>
> Sent: Saturday, January 24, 2004 1:26 PM
> Subject: Re: Fw: TASK_EXCLUSIVE undelared ?
> 
> 
> > >
> > >  The task states are not applicable for modules that execute in
> > > kernel
> > >  mode.
> >
> > And I would suggest googling for it before you answer :)
> > Muthu
> >
> > PS: flames to /dev/null
> >
> >
> >
> >
> > >
> > >
> > >
> > > --
> > > Kernelnewbies: Help each other learn about the Linux kernel.
> > > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > > FAQ:           http://kernelnewbies.org/faq/
> > >
> >
> 
> did you ?
> 
> 
> The kernel execution may not necessarily have a context in the user
> space and in that case current has no meaning .

It MAY not have, but it surely CAN.

The boundary lies between process context and interrupt/hb/tasklet
context. Current is valid iff the code runs in process context. Being in
process context does not mean, that there is a userland for the process.
Kernel threads don't have any user space part, their memory map
(current->mm) is NULL, but they are still scheduled like any other
process and have current like any other process.

Task states ARE applicable for code in modules if it is:
    * Run from a syscall handler. This includes methods of dentries and
      inodes, which includes all filesystem and pseudo-filesystem
      drivers and device nodes.
    * Run in a kernel thread created with the kernel_thread call.
Task states are NOT applicable for code running in interrups,
bottom-halves and tasklets.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

--
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