10 #include "xarm/core/os/thread.h" 12 #define PRINT_ERR printf 24 m_handle = (HANDLE)_beginthreadex(NULL, 0, fun_point, arg, 0, NULL);
25 if (NULL == m_handle)
PRINT_ERR(
"error: pthread create failes\n");
30 void thread_delete(HANDLE m_handle) { CloseHandle(m_handle); }
37 pthread_attr_init(&attr);
38 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
39 char ret = pthread_create(&
id, &attr, fun_point, arg);
40 if (0 != ret)
PRINT_ERR(
"error: pthread create failes\n");
void thread_delete(pthread_t id)
pthread_t thread_init(fun_point_t fun_point, void *arg)
void *(* fun_point_t)(void *)