-
deuce authored
When a resize event is serviced, cache the new scaling factor. Next time the event queue is empty, attempt to lock vstatlock. If that succeeds, apply the new scaling. If not, wait for the queue to drain again. This may cause the scaling to be slightly delayed, but should completely solve this deadlock. This deadlock likely never affected FreeBSD since FreeBSD has deadlock detection, and the return value of pthread_mutex_lock() isn't tested. The result would have been a silent failure to lock, and an update of the scaling factor regardless, followed by a silent (again untested) failure of the matching pthread_mutex_unlock() call.
deuce authoredWhen a resize event is serviced, cache the new scaling factor. Next time the event queue is empty, attempt to lock vstatlock. If that succeeds, apply the new scaling. If not, wait for the queue to drain again. This may cause the scaling to be slightly delayed, but should completely solve this deadlock. This deadlock likely never affected FreeBSD since FreeBSD has deadlock detection, and the return value of pthread_mutex_lock() isn't tested. The result would have been a silent failure to lock, and an update of the scaling factor regardless, followed by a silent (again untested) failure of the matching pthread_mutex_unlock() call.
Loading