121 lines
2.0 KiB
C
121 lines
2.0 KiB
C
|
|
#include <bh/internal/thread.h>
|
||
|
|
|
||
|
|
int bh_thread_init_base(bh_thread_t *thread,
|
||
|
|
bh_task_t *task,
|
||
|
|
bh_thread_begin_cb_t begin,
|
||
|
|
bh_thread_end_cb_t end)
|
||
|
|
{
|
||
|
|
(void)thread;
|
||
|
|
(void)task;
|
||
|
|
return -1;
|
||
|
|
}
|
||
|
|
|
||
|
|
bh_thread_t *bh_thread_new_base(bh_task_t *task,
|
||
|
|
bh_thread_begin_cb_t begin,
|
||
|
|
bh_thread_end_cb_t end)
|
||
|
|
{
|
||
|
|
(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_base(bh_thread_pool_t *pool,
|
||
|
|
size_t size,
|
||
|
|
bh_thread_begin_cb_t begin,
|
||
|
|
bh_thread_end_cb_t end)
|
||
|
|
{
|
||
|
|
(void)pool;
|
||
|
|
(void)size;
|
||
|
|
return -1;
|
||
|
|
}
|
||
|
|
|
||
|
|
bh_thread_pool_t *bh_thread_pool_new_base(size_t size,
|
||
|
|
bh_thread_begin_cb_t begin,
|
||
|
|
bh_thread_end_cb_t end)
|
||
|
|
{
|
||
|
|
(void)size;
|
||
|
|
return NULL;
|
||
|
|
}
|
||
|
|
|