lkml.org 
[lkml]   [1999]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectQuestion on spinlocks and reentrancy
Greetings,

I have read (several times) Linus' excellent documentation on spinlocks in
Documentation/spinlocks.txt. I have also read all of the spinlock-related
header files in the kernel. This answers most questions, however, I have a
more fundamental issue I am still uncertain of. That is generally when to
use a spinlock for situations where no interrupt is involved; i.e.
non-interrupt-related reentrancy.

For example, say I am about to muddle with some members of current. If I
am in init_module() do I need a spinlock (like lock_kernel())? How about
in a system call that has no chance of sleeping? From within tq_scheduler?
What about within a kernel thread? Say I do a "struct task_struct *task =
current" and then only access members through task; do I still need a
spinlock at all?

Thank you for any information,
-bp
--
B. James Phillippe . bryan@terran.org
Software Engineer, WGT Inc. . http://www.terran.org/~bryan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.026 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site