mutual exclusion in vkbd

Norbert Koch NKoch at demig.de
Tue May 31 08:41:43 PDT 2005


Hello.

I am currently trying to backport vkbd to FreeBSD 4.

Maksim Yevmenkin uses mtx_lock()/mtx_unlock() for
protecting access to data structures under FreeBSD 5/6
between the device functions and the kernel thread.

How should I best do this under FreeBSD 4?

Would something like splhigh() work in that context?
Or should I use lockmgr with LK_EXCLUSIVE/LK_RELEASE?
Is there any (pseudo)process context inside a kernel task?

Thank you for any help,

Norbert Koch


More information about the freebsd-hackers mailing list