--- - branch: MAIN date: Fri Sep 4 16:41:39 UTC 2009 files: - new: '1.16' old: '1.15' path: src/sys/rump/librump/rumpkern/ltsleep.c pathrev: src/sys/rump/librump/rumpkern/ltsleep.c@1.16 type: modified id: 20090904T164139Z.82ae7587dfe590f8eeba7fa9c11dfd5586738843 log: | Actually, we cannot release the megalock before we take sleepermtx, since that opens a race window for non-mpsafe code, so do it after. Additionally, we cannot call mutex_enter() for sleepermtx, since ltsleep/mtsleep should not block (i.e. release kernel lock) before actually blocking, so busyloop in mutex_tryenter(). Finally, when waking up, take kernel lock back only *after* releasing sleepermtx to avoid deadlock against another thread holding the kernel lock and wanting sleepermtx. module: src subject: 'CVS commit: src/sys/rump/librump/rumpkern' unixtime: '1252082499' user: pooka