Re: Kernel threads questions

From: Russell King (rmk@arm.linux.org.uk)
Date: Fri Sep 15 2000 - 05:23:50 EST


Jaime Medrano writes:
> I have read somewhere that in a kernel thread the stack can't be used
> because there is no copy-on-write. I want also to know if I can make any
> syscall from a kernel thread.

That is not true anymore - when a kernel thread is created, it gets a new
task_struct, and therefore a new stack.

In fact, the "normal" way that the current task is determined is using
the stack pointer (the threads kernel stack and task struct are kept in
the same 8k page).
   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:25 EST