locking in a device driver

M. Warner Losh imp at bsdimp.com
Thu Oct 27 19:54:56 PDT 2005


In message: <4361044B.50807 at alphaque.com>
            Dinesh Nair <dinesh at alphaque.com> writes:
: the userland application uses pthreads, and works like a charm both on 4.x 
: and 5.x without using the device. however, when the device is used, it 
: somehow has synchronization errors on 4.x, leading to timers (created in 
: the userland app) timing out and the like.

libc_r will block all other threads in the application while an ioctl
executes.  libpthread and libthr won't.  I've had several bugs at work
that can be traced to faulty drivers and/or faulty APIs that were
specified by people who were unaware of this issue...

Warner


More information about the freebsd-hackers mailing list