aboutsummaryrefslogtreecommitdiff
path: root/src/thread_null.c
diff options
context:
space:
mode:
authorMikhail Romanko <me@blankhex.com>2024-04-23 23:45:43 +0300
committerMikhail Romanko <me@blankhex.com>2024-04-23 23:45:43 +0300
commit692b5b42974e2f81dc4ad708a4593b1e8cb2bd3d (patch)
treeb7eec97f4a12e0090b9421e7dfe8a6116b7ef4d8 /src/thread_null.c
parentec499b6cfc3fe196757d4467ca044b5915198d45 (diff)
downloadbhlib-old-692b5b42974e2f81dc4ad708a4593b1e8cb2bd3d.tar.gz
Sync to the latest version.
Can be broken or partially implemented.
Diffstat (limited to 'src/thread_null.c')
-rw-r--r--src/thread_null.c113
1 files changed, 113 insertions, 0 deletions
diff --git a/src/thread_null.c b/src/thread_null.c
new file mode 100644
index 0000000..494e0b6
--- /dev/null
+++ b/src/thread_null.c
@@ -0,0 +1,113 @@
+#include <bh/internal/thread.h>
+
+int bh_thread_init(bh_thread_t *thread,
+ bh_task_t *task)
+{
+ (void)thread;
+ (void)task;
+ return -1;
+}
+
+bh_thread_t *bh_thread_new(bh_task_t *task)
+{
+ (void)task;
+ return NULL;
+}
+
+int bh_thread_join(bh_thread_t *thread)
+{
+ (void)thread;
+ return -1;
+}
+
+int bh_thread_detach(bh_thread_t *thread)
+{
+ (void)thread;
+ return -1;
+}
+
+int bh_mutex_init(bh_mutex_t *mutex)
+{
+ (void)mutex;
+ return -1;
+}
+
+void bh_mutex_destroy(bh_mutex_t *mutex)
+{
+ (void)mutex;
+}
+
+int bh_mutex_lock(bh_mutex_t *mutex)
+{
+ (void)mutex;
+ return -1;
+}
+
+int bh_mutex_try_lock(bh_mutex_t *mutex)
+{
+ (void)mutex;
+ return -1;
+}
+
+int bh_mutex_unlock(bh_mutex_t *mutex)
+{
+ (void)mutex;
+ return -1;
+}
+
+int bh_cond_init(bh_cond_t *cond)
+{
+ (void)cond;
+ return -1;
+}
+
+void bh_cond_destroy(bh_cond_t *cond)
+{
+ (void)cond;
+}
+
+int bh_cond_wait(bh_cond_t *cond,
+ bh_mutex_t *mutex)
+{
+ (void)cond;
+ (void)mutex;
+ return -1;
+}
+
+int bh_cond_wait_for(bh_cond_t *cond,
+ bh_mutex_t *mutex,
+ unsigned long timeout)
+{
+ (void)cond;
+ (void)mutex;
+ (void)timeout;
+ return -1;
+}
+
+int bh_cond_signal(bh_cond_t *cond)
+{
+ (void)cond;
+ return -1;
+}
+
+int bh_cond_broadcast(bh_cond_t *cond)
+{
+ (void)cond;
+ return -1;
+}
+
+int bh_thread_pool_init(bh_thread_pool_t *pool,
+ size_t size)
+{
+ (void)pool;
+ (void)size;
+ return -1;
+}
+
+bh_thread_pool_t *bh_thread_pool_new(size_t size)
+{
+ (void)size;
+ return NULL;
+}
+
+