K 10 svn:author V 3 jhb K 8 svn:date V 27 2001-05-30T14:35:22.000000Z K 7 svn:log V 446 We can't grab the sched_lock in set_user_ldt() because when it is called from cpu_switch(), curproc has been changed, but the sched_lock owner will not be updated until we return to mi_switch(), thus we deadlock against ourselves. As a workaround, push the acquire and release of sched_lock out to the callers of set_user_ldt(). Note that we can't use a mtx_assert() in set_user_ldt for the same reason. Sleuting by: tmm Tested by: tmm, dougb END