Properly cast thread functions for pthreads
This commit is contained in:
parent
ed9a35324d
commit
893ed2fad0
|
@ -190,12 +190,13 @@ _NOTE(CONSTCOND) } while (0)
|
||||||
#define curthread ((void *)(uintptr_t)pthread_self())
|
#define curthread ((void *)(uintptr_t)pthread_self())
|
||||||
|
|
||||||
typedef struct kthread kthread_t;
|
typedef struct kthread kthread_t;
|
||||||
|
typedef void (*thread_func_t)(void *);
|
||||||
|
|
||||||
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
|
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
|
||||||
zk_thread_create(func, arg)
|
zk_thread_create((thread_func_t)func, arg)
|
||||||
#define thread_exit() pthread_exit(NULL)
|
#define thread_exit() pthread_exit(NULL)
|
||||||
|
|
||||||
extern kthread_t *zk_thread_create(void (*func)(void), void *arg);
|
extern kthread_t *zk_thread_create(thread_func_t func, void *arg);
|
||||||
|
|
||||||
#define issig(why) (FALSE)
|
#define issig(why) (FALSE)
|
||||||
#define ISSIG(thr, why) (FALSE)
|
#define ISSIG(thr, why) (FALSE)
|
||||||
|
|
Loading…
Reference in New Issue