Messages in this thread | | | Date | Sat, 4 Sep 1999 17:55:38 +0530 (IST) | From | "" <> | Subject | SMP linux help |
| |
Hi, I am running linux 2.9.9 kernel. I am trying the understand the locking mechanism used in linux to make the kernel SMP safe. In do_fork() (also in many other syscall interface functions) there is call to lock_kernel() function. What does lock_kernel() do? If it is used to synchronize the access to kernel data structures from other processes on other processors, then why, after having called this function, we again try to do some locking like calling spin_lock(&lastpid_lock) in get_pid()?
I have seen the definition of lock_kernel. It increments the current->lock_depth and if it nonzero then tries to lock the kernel_flag variable.
Kindly reply. I am on this mailing list.
Thanks, Sushil.
- 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/
| |