|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Threading abstraction for WASM/Emscripten using pthreads. More...
Go to the source code of this file.
Functions | |
| int | mutex_init (mutex_t *mutex) |
| int | mutex_destroy (mutex_t *mutex) |
| int | mutex_lock_impl (mutex_t *mutex) |
| int | mutex_trylock_impl (mutex_t *mutex) |
| int | mutex_unlock_impl (mutex_t *mutex) |
| int | asciichat_thread_create (asciichat_thread_t *thread, void *(*start_routine)(void *), void *arg) |
| int | asciichat_thread_join (asciichat_thread_t *thread, void **retval) |
| int | asciichat_thread_detach (asciichat_thread_t *thread) |
| asciichat_thread_t | asciichat_thread_self (void) |
| int | asciichat_thread_equal (asciichat_thread_t t1, asciichat_thread_t t2) |
| int | rwlock_init (rwlock_t *rwlock) |
| int | rwlock_rdlock_impl (rwlock_t *rwlock) |
| int | rwlock_wrlock_impl (rwlock_t *rwlock) |
| int | rwlock_rdunlock_impl (rwlock_t *rwlock) |
| int | rwlock_wrunlock_impl (rwlock_t *rwlock) |
| uint64_t | asciichat_thread_current_id (void) |
| int | ascii_tls_key_create (tls_key_t *key, void(*destructor)(void *)) |
| int | ascii_tls_key_delete (tls_key_t key) |
| void * | ascii_tls_get (tls_key_t key) |
| int | ascii_tls_set (tls_key_t key, void *value) |
Threading abstraction for WASM/Emscripten using pthreads.
Definition in file threading.c.
| void * ascii_tls_get | ( | tls_key_t | key | ) |
Definition at line 97 of file threading.c.
Referenced by asciichat_instr_runtime_get().
| int ascii_tls_key_create | ( | tls_key_t * | key, |
| void(*)(void *) | destructor | ||
| ) |
Definition at line 89 of file threading.c.
| int ascii_tls_key_delete | ( | tls_key_t | key | ) |
Definition at line 93 of file threading.c.
Referenced by asciichat_instr_runtime_global_destroy().
| int ascii_tls_set | ( | tls_key_t | key, |
| void * | value | ||
| ) |
Definition at line 101 of file threading.c.
Referenced by asciichat_instr_runtime_get().
| int asciichat_thread_create | ( | asciichat_thread_t * | thread, |
| void *(*)(void *) | start_routine, | ||
| void * | arg | ||
| ) |
Definition at line 42 of file threading.c.
Referenced by acip_websocket_client_transport_create(), audio_start_duplex(), discover_session_parallel(), ffmpeg_decoder_start_prefetch(), parallel_connect(), server_main(), session_host_start(), session_host_start_render(), session_participant_start_audio_capture(), session_participant_start_video_capture(), splash_intro_start(), tcp_server_run(), tcp_server_spawn_thread(), thread_create_or_fail(), and thread_pool_spawn().
| uint64_t asciichat_thread_current_id | ( | void | ) |
Definition at line 84 of file threading.c.
Referenced by asciichat_instr_runtime_get(), log_json_async_safe(), and log_json_write().
| int asciichat_thread_detach | ( | asciichat_thread_t * | thread | ) |
Definition at line 50 of file threading.c.
| int asciichat_thread_equal | ( | asciichat_thread_t | t1, |
| asciichat_thread_t | t2 | ||
| ) |
Definition at line 58 of file threading.c.
Referenced by remove_client().
| int asciichat_thread_join | ( | asciichat_thread_t * | thread, |
| void ** | retval | ||
| ) |
Definition at line 46 of file threading.c.
Referenced by audio_destroy(), audio_stop_duplex(), discover_session_parallel(), ffmpeg_decoder_destroy(), parallel_connect(), remove_client(), server_main(), session_host_start(), session_host_stop(), session_host_stop_render(), session_participant_stop_audio_capture(), session_participant_stop_video_capture(), splash_intro_done(), stop_client_render_threads(), stop_client_threads(), and thread_pool_stop_all().
| asciichat_thread_t asciichat_thread_self | ( | void | ) |
Definition at line 54 of file threading.c.
Referenced by client_receive_thread(), log_lock_terminal(), log_plain_msg(), platform_print_backtrace_symbols(), and remove_client().
| int mutex_destroy | ( | mutex_t * | mutex | ) |
Definition at line 21 of file threading.c.
Referenced by acip_webrtc_transport_create(), acip_websocket_client_transport_create(), acip_websocket_server_transport_create(), app_client_create(), app_client_destroy(), asciichat_instr_runtime_global_destroy(), audio_destroy(), audio_init(), audio_ring_buffer_destroy(), buffer_pool_destroy(), colorscheme_destroy(), discover_session_parallel(), ffmpeg_decoder_create(), ffmpeg_decoder_destroy(), framebuffer_create(), framebuffer_create_multi(), framebuffer_destroy(), log_destroy(), media_source_create(), media_source_destroy(), node_pool_destroy(), options_state_destroy(), options_state_init(), parallel_connect(), remove_client(), server_connection_cleanup(), server_main(), session_host_destroy(), session_log_buffer_destroy(), stats_cleanup(), tcp_client_destroy(), tcp_server_destroy(), thread_pool_destroy(), video_frame_buffer_destroy(), and webrtc_peer_manager_destroy().
| int mutex_init | ( | mutex_t * | mutex | ) |
Definition at line 16 of file threading.c.
Referenced by acip_webrtc_transport_create(), acip_websocket_client_transport_create(), acip_websocket_server_transport_create(), add_client(), add_webrtc_client(), app_client_create(), asciichat_instr_coverage_enabled(), asciichat_instr_runtime_get(), audio_init(), buffer_pool_create(), colorscheme_init(), discover_session_parallel(), ffmpeg_decoder_create(), framebuffer_create(), framebuffer_create_multi(), interactive_grep_init(), log_init(), media_source_create(), memory_backend_create(), node_pool_create(), options_state_init(), parallel_connect(), server_connection_init(), server_main(), session_host_create(), session_log_buffer_init(), splash_display_status(), splash_set_update_notification(), stats_init(), tcp_client_create(), tcp_server_init(), thread_pool_create(), video_frame_buffer_create(), and webrtc_peer_manager_create().
| int mutex_lock_impl | ( | mutex_t * | mutex | ) |
Definition at line 26 of file threading.c.
Referenced by debug_mutex_lock().
| int mutex_trylock_impl | ( | mutex_t * | mutex | ) |
Definition at line 31 of file threading.c.
Referenced by debug_mutex_trylock().
| int mutex_unlock_impl | ( | mutex_t * | mutex | ) |
Definition at line 36 of file threading.c.
Referenced by debug_mutex_unlock().
| int rwlock_init | ( | rwlock_t * | rwlock | ) |
Definition at line 63 of file threading.c.
References rwlock.
Referenced by mixer_create(), server_main(), symbol_cache_init(), and timer_system_init().
| int rwlock_rdlock_impl | ( | rwlock_t * | rwlock | ) |
| int rwlock_rdunlock_impl | ( | rwlock_t * | rwlock | ) |
Definition at line 75 of file threading.c.
References rwlock.
Referenced by debug_rwlock_rdunlock().
| int rwlock_wrlock_impl | ( | rwlock_t * | rwlock | ) |
| int rwlock_wrunlock_impl | ( | rwlock_t * | rwlock | ) |
Definition at line 79 of file threading.c.
References rwlock.
Referenced by debug_rwlock_wrunlock().