thread.h
Go to the documentation of this file.
1 /* Copyright 2017 UFACTORY Inc. All Rights Reserved.
2  *
3  * Software License Agreement (BSD License)
4  *
5  * Author: Jimy Zhang <jimy92@163.com>
6  ============================================================================*/
7  /*#ifndef CORE_LINUX_THREAD_H_
8  #define CORE_LINUX_THREAD_H_
9 
10  #include <pthread.h>
11 
12  typedef void *(*fun_point_t)(void *);
13 
14  void thread_delete(pthread_t id);
15  pthread_t thread_init(fun_point_t fun_point, void *arg);
16 
17  #endif
18  */
19 
20 #ifndef THREAD_H_
21 #define THREAD_H_
22 
23 #ifdef _WIN32
24 #include <windows.h>
25 #include <process.h>
26 #else
27 #include <pthread.h>
28 #endif
29 
30 
31 #ifdef WIN32
32 //typedef unsigned __stdcall *(*fun_point_t)(void *);
33 typedef unsigned __stdcall fun_point_t(void*);
34 void thread_delete(HANDLE m_handle);
35 HANDLE thread_init(fun_point_t fun_point, void *arg);
36 #else
37 typedef void *(*fun_point_t)(void *);
38 void thread_delete(pthread_t id);
39 pthread_t thread_init(fun_point_t fun_point, void *arg);
40 #endif
41 
42 #endif // THREAD_H_
void thread_delete(pthread_t id)
Definition: thread.cc:45
void *(* fun_point_t)(void *)
Definition: thread.h:37
pthread_t thread_init(fun_point_t fun_point, void *arg)
Definition: thread.cc:33


xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23