skipping locks, mutex_owned, usb

2011-08-23 Thread Andriy Gapon
Yes, the subject sounds quite hairy, so please let me try to explain it. First, let's consider one concrete function: static int ukbd_poll(keyboard_t *kbd, int on) { struct ukbd_softc *sc = kbd-kb_data; if (!mtx_owned(Giant)) { /* XXX cludge */

Re: skipping locks, mutex_owned, usb

2011-08-23 Thread Hans Petter Selasky
On Tuesday 23 August 2011 14:09:15 Andriy Gapon wrote: Yes, the subject sounds quite hairy, so please let me try to explain it. First, let's consider one concrete function: static int ukbd_poll(keyboard_t *kbd, int on) { struct ukbd_softc *sc = kbd-kb_data; if