Call pthread_rwlock_init on the rwlock

The spec says the results are undefined if an uninitialised
	read-write lock is used without being initialised, though
	evidently things were working out alright
This commit is contained in:
Marc Di Luzio 2018-02-15 13:54:55 +00:00
parent 72e24b5292
commit 7a3ae91781

View File

@ -102,6 +102,7 @@ void game_mode_context_init(GameModeContext *self)
update_initial_gov_state(); update_initial_gov_state();
LOG_MSG("governor is set to [%s]\n", get_initial_governor()); LOG_MSG("governor is set to [%s]\n", get_initial_governor());
pthread_rwlock_init(&self->rwlock, NULL);
pthread_mutex_init(&self->reaper.mutex, NULL); pthread_mutex_init(&self->reaper.mutex, NULL);
pthread_cond_init(&self->reaper.condition, NULL); pthread_cond_init(&self->reaper.condition, NULL);