|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Go to the source code of this file.
Data Structures | |
| struct | int_field_ctx_t |
| Context for integer field updates in RCU updater callback. More... | |
| struct | bool_field_ctx_t |
| Context for boolean field updates in RCU updater callback. More... | |
| struct | string_field_ctx_t |
| Context for string field updates in RCU updater callback. More... | |
| struct | double_field_ctx_t |
| Context for double field updates in RCU updater callback. More... | |
Macros | |
| #define | MAX_DEFERRED_FREES 64 |
| Deferred free list for old options structs. | |
Functions | |
| __attribute__ ((constructor)) | |
| Constructor to initialize fork handlers at startup. | |
| asciichat_error_t | options_state_init (void) |
| asciichat_error_t | options_state_set (const options_t *opts) |
| void | options_state_destroy (void) |
| void | options_cleanup_schema (void) |
| const options_t * | options_get (void) |
| asciichat_error_t | options_set_int (const char *field_name, int value) |
| asciichat_error_t | options_set_bool (const char *field_name, bool value) |
| asciichat_error_t | options_set_string (const char *field_name, const char *value) |
| asciichat_error_t | options_set_double (const char *field_name, double value) |
| #define MAX_DEFERRED_FREES 64 |
Deferred free list for old options structs.
We can't immediately free old structs because readers might still be using them. Simple strategy: Keep old pointers in a list, free them at shutdown.
Future improvements:
Current approach: Never free until shutdown (acceptable for rare updates)
| __attribute__ | ( | (constructor) | ) |
Constructor to initialize fork handlers at startup.
This is called before main() by the linker, ensuring fork handlers are registered early.
Definition at line 208 of file rcu.c.
| void options_cleanup_schema | ( | void | ) |
Definition at line 343 of file rcu.c.
References config_schema_destroy().
Referenced by main().
| const options_t * options_get | ( | void | ) |
Definition at line 347 of file rcu.c.
Referenced by acds_main(), client_crypto_init(), client_main(), discovery_session_process(), log_set_terminal_output(), main(), nat_detect_quality(), server_crypto_handshake(), session_settings_from_options(), and threaded_send_terminal_size_with_auto_detect().
| asciichat_error_t options_set_bool | ( | const char * | field_name, |
| bool | value | ||
| ) |
Definition at line 562 of file rcu.c.
References bool_field_ctx_t::field_name.
Referenced by client_main(), session_handle_keyboard_input(), set_flip_x(), and set_matrix_rain().
| asciichat_error_t options_set_double | ( | const char * | field_name, |
| double | value | ||
| ) |
Definition at line 695 of file rcu.c.
References double_field_ctx_t::field_name.
Referenced by session_handle_keyboard_input().
| asciichat_error_t options_set_int | ( | const char * | field_name, |
| int | value | ||
| ) |
Definition at line 449 of file rcu.c.
References int_field_ctx_t::field_name.
Referenced by session_handle_keyboard_input(), session_settings_apply_to_options(), set_color_filter(), set_color_mode(), set_height(), set_palette(), set_render_mode(), set_target_fps(), and set_width().
| asciichat_error_t options_set_string | ( | const char * | field_name, |
| const char * | value | ||
| ) |
Definition at line 647 of file rcu.c.
References string_field_ctx_t::field_name.
Referenced by set_palette_chars().
| void options_state_destroy | ( | void | ) |
Definition at line 309 of file rcu.c.
References config_schema_destroy(), and mutex_destroy().
Referenced by asciichat_shared_destroy(), client_cleanup(), main(), mirror_cleanup(), and server_main().
| asciichat_error_t options_state_init | ( | void | ) |
Definition at line 218 of file rcu.c.
References mutex_destroy(), mutex_init(), options_t_new(), and platform_get_pid().
Referenced by __attribute__(), and options_init().
| asciichat_error_t options_state_set | ( | const options_t * | opts | ) |
Definition at line 284 of file rcu.c.
Referenced by config_load_and_apply(), and options_init().