From 7e10cc3a0ba71e9ff026882781c91d0db7098603 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Tue, 2 Jul 2019 17:22:18 +0200 Subject: [PATCH] daemon: make game_mode_client_unref public So it can be used outside ouf gamemode-context.c. --- daemon/gamemode-context.c | 3 +-- daemon/gamemode.h | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/daemon/gamemode-context.c b/daemon/gamemode-context.c index e9151f7..3108e70 100644 --- a/daemon/gamemode-context.c +++ b/daemon/gamemode-context.c @@ -87,7 +87,6 @@ static GameModeContext instance = { 0 }; static volatile bool had_context_init = false; static GameModeClient *game_mode_client_new(pid_t pid, char *exe); -static void game_mode_client_unref(GameModeClient *client); static const GameModeClient *game_mode_context_has_client(GameModeContext *self, pid_t client); static void *game_mode_context_reaper(void *userdata); static void game_mode_context_enter(GameModeContext *self); @@ -625,7 +624,7 @@ static GameModeClient *game_mode_client_new(pid_t pid, char *executable) /** * Unref a client and the next element in the list, if non-null. */ -static void game_mode_client_unref(GameModeClient *client) +void game_mode_client_unref(GameModeClient *client) { if (!client) { return; diff --git a/daemon/gamemode.h b/daemon/gamemode.h index c2bfcd7..03d9822 100644 --- a/daemon/gamemode.h +++ b/daemon/gamemode.h @@ -45,6 +45,15 @@ typedef struct GameModeContext GameModeContext; typedef struct GameModeConfig GameModeConfig; typedef struct GameModeClient GameModeClient; +/** + * GameModeClient related functions + */ + +/** + * Decrement the usage count of client. + */ +void game_mode_client_unref(GameModeClient *client); + /** * Return the singleton instance */