Hi, time ago we started the work to place all globals inside RedsState. There are still some globals left: - dcc-encoders.c: - glz_dictionary_list and glz_dictionary_list_lock Not a big issue, perhaps they should be stored inside RedClient to avoid the global - display-channel.c and image-cache.c: - image_surfaces_ops and image_cache_ops These should IMHO be constant, no reason to have them variable - event-loop.c: - event_loop_core This is used for writing only by tests, can be constant - inputs-channel.c: - key_modifiers_timer This should be in RedsState... somehow - pixmap-cache.c: - pixmap_cache_list, cache_lock Similar to dcc-encoders.c usage, could be in RedClient, not an issue - reds.c: - lock_count See patch that remove it - lock_cs This is fine to be global however in theory is initialized for every SpiceServer which is a bug - servers Fine to be a global, but should be protected by a mutex - allowed (static inside reds_update_client_mouse_allowed) shouldn't be hard to turn to a RedsState field - core_public and core_interface_adapter Should be possible to have different one for each SpiceServer, not easy to do - red-worker.c: - worker_source_funcs GLib requires to be no const but shouldn't be modified once initialized once - smartcard.c: - g_smartcard_readers and g_smartcard_channel Should be removed... somehow - sound.c: - workers mainly per RedClient, there are thread issues, list should be protected - spicevmc.c: - id (static in spicevmc_device_connect) I don't think is a big issue, even considering possible thread issues - sw-canvas.c: - sw_canvas_ops Modified only at startup, then constant, not a problem Patches welcome. Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel