mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-08-07 13:48:30 +02:00
Get ready for re-setting ioprio value on un-register
Implements tests for feature Fixes CLAMP macro
This commit is contained in:
@@ -72,6 +72,7 @@ struct GameModeContext {
|
||||
struct GameModeGPUInfo *target_gpu; /**<Target GPU info for the current GPU */
|
||||
|
||||
int initial_renice; /**<Initial renice value */
|
||||
int initial_ioprio; /**<Initial ioprio value */
|
||||
|
||||
/* Reaper control */
|
||||
struct {
|
||||
@@ -418,12 +419,13 @@ int game_mode_context_register(GameModeContext *self, pid_t client, pid_t reques
|
||||
self->initial_renice = game_mode_get_renice(client);
|
||||
game_mode_apply_renice(self, client, 0 /* expect zero value to start with */);
|
||||
|
||||
/* Store current ioprio value and apply */
|
||||
self->initial_ioprio = game_mode_get_ioprio(client);
|
||||
game_mode_apply_ioprio(self, client, IOPRIO_DEFAULT);
|
||||
|
||||
/* Apply scheduler policies */
|
||||
game_mode_apply_scheduling(self, client);
|
||||
|
||||
/* Apply io priorities */
|
||||
game_mode_apply_ioprio(self, client);
|
||||
|
||||
game_mode_client_count_changed();
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user