Hi there,
I need some mechanism to hold long-term locks (across
context switches) while using kernel threads (kthread_*)
and lockmgr() looked like the right thing to use.
I am running FreeBSD 4.1 on a uniprocessor (..the questions
are similar with 4.3)
Looking at kern_lock.c, I see that lockmgr() uses simple
locks. On a UP system, simple locks are turned off.
I dont see any way to prevent a context switch while the
kernel thread is in the lockmgr code - after going
thru a simple_lock() call. Is this correct ?
So my questions are :
1) Is lockmgr safe ?
2) Are there other sync primitives that can be used
between two kernel entities (i can move to 4.3)
3) What is the use of simplelock_recurse in
kern_lock.c ?
TIA,
-Sandeep
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message