ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
stubs/threading.c
Go to the documentation of this file.
1
9#include <stdint.h>
10
11int asciichat_thread_join_timeout(asciichat_thread_t *thread, void **retval, uint64_t timeout_ns) {
12 (void)thread;
13 (void)retval;
14 (void)timeout_ns;
15 return 0; // Success - no-op in WASM
16}
17
19 (void)thread;
20 return true;
21}
22
23/* Thread pool stubs */
24typedef void thread_pool_t;
25
27 (void)num_threads;
28 return NULL;
29}
30
34
35/* Condition variable stubs */
36int cond_init(cond_t *cond, const char *name) {
37 (void)cond;
38 (void)name;
39 return 0;
40}
41
42int cond_destroy(cond_t *cond) {
43 (void)cond;
44 return 0;
45}
46
47int cond_signal(cond_t *cond) {
48 (void)cond;
49 return 0;
50}
51
53 (void)cond;
54 return 0;
55}
56
58 (void)cond;
59 (void)mutex;
60 return 0;
61}
62
64 (void)cond;
65 (void)mutex;
66 (void)timeout_ns;
67 return 0;
68}
Platform abstraction layer umbrella header providing unified cross-platform API.
mutex_t mutex
⚠️‼️ Comprehensive thread-local error context system for ascii-chat
buffer_pool_t * pool
unsigned long long uint64_t
Definition common.h:59
int asciichat_thread_join_timeout(asciichat_thread_t *thread, void **retval, uint64_t timeout_ns)
Wait for a thread to complete with timeout.
int cond_broadcast(cond_t *cond)
Broadcast to a condition variable (wake all waiting threads)
int cond_signal(cond_t *cond)
Signal a condition variable (wake one waiting thread)
bool asciichat_thread_is_initialized(asciichat_thread_t *thread)
Check if a thread handle has been initialized.
int cond_init(cond_t *cond, const char *name)
Initialize a condition variable with a name.
int cond_wait_impl(cond_t *cond, mutex_t *mutex)
Wait on a condition variable (blocking) - implementation function.
int cond_timedwait_impl(cond_t *cond, mutex_t *mutex, uint64_t timeout_ns)
Wait on a condition variable with timeout - implementation function.
int cond_destroy(cond_t *cond)
Destroy a condition variable.
void * asciichat_thread_t
Condition variable type (POSIX: pthread_cond_t with debug tracking)
Definition cond.h:63
Mutex type (POSIX: pthread_mutex_t with debug tracking)
void thread_pool_destroy(thread_pool_t *pool)
Destroy a thread pool.
void thread_pool_t
thread_pool_t * thread_pool_create(int num_threads)