天天看点

c语言之强制转换(变量, 函数)

static void * _Thread(const char *name, void (*thread)(void*), int stacksize, int prio, void *arg)

{}

int  _ThreadCreate(  void **thread_handle,  void *(*work_routine)(void *), void *arg, hal_os_thread_param_t *hal_os_thread_param,  int *stack_used)

{

 //      void (*__work_routine)(void *);

//        __work_routine = (void (*)(void *)) work_routine;

 //      *thread_handle = _ThreadStart("yy_pthread",  __work_routine, STACKSIZE, PRIO, NULL); 

*thread_handle = _ThreadStart("yy_pthread",  (void (*)(void *)) work_routine, STACKSIZE, PRIO, NULL);

}