From a0b850474ddc627747617f86d51a8e1c2ec5590b Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Fri, 24 May 2019 08:48:38 +0100 Subject: [PATCH] Fix comments --- daemon/gamemode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/gamemode.c b/daemon/gamemode.c index 444b123..cb8acd7 100644 --- a/daemon/gamemode.c +++ b/daemon/gamemode.c @@ -438,6 +438,8 @@ int game_mode_context_register(GameModeContext *self, pid_t client, pid_t reques } game_mode_apply_client_optimisations(self, client); + + /* Unlock now we're done applying optimisations */ pthread_rwlock_unlock(&self->rwlock); game_mode_client_count_changed(); @@ -516,8 +518,6 @@ int game_mode_context_unregister(GameModeContext *self, pid_t client, pid_t requ break; } - /* Unlock here, potentially yielding */ - if (!found) { LOG_HINTED( ERROR, @@ -538,6 +538,7 @@ int game_mode_context_unregister(GameModeContext *self, pid_t client, pid_t requ game_mode_remove_client_optimisations(self, client); + /* Unlock now we're done applying optimisations */ pthread_rwlock_unlock(&self->rwlock); game_mode_client_count_changed();