Skip to content
Snippets Groups Projects
Commit fdf8e1a9 authored by deuce's avatar deuce
Browse files

Fix deadlock on vstatlock.

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.
parent a608be62
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment