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

Grab the appropriate lock during request|check_redraw|pixels().

Hopefully fixes missed updates.
parent e4abf3d3
No related branches found
No related tags found
No related merge requests found
......@@ -113,8 +113,10 @@ static int check_redraw(void)
int ret;
pthread_mutex_lock(&redraw_lock);
pthread_rwlock_rdlock(&vmem_lock);
ret = force_redraws;
force_redraws = 0;
pthread_rwlock_unlock(&vmem_lock);
pthread_mutex_unlock(&redraw_lock);
return ret;
}
......@@ -123,7 +125,9 @@ static pthread_mutex_t pixels_lock;
void request_pixels(void)
{
pthread_mutex_lock(&pixels_lock);
pthread_rwlock_rdlock(&screen.screenlock);
update_pixels = 1;
pthread_rwlock_unlock(&screen.screenlock);
pthread_mutex_unlock(&pixels_lock);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment