Messages in this thread | | | Date | Fri, 14 May 1999 23:33:58 -0700 (PDT) | From | "B. James Phillippe" <> | Subject | Question 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/
| |