1 /**
2  * @file lv_pthread.h
3  *
4  */
5 
6 #ifndef LV_PTHREAD_H
7 #define LV_PTHREAD_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #if LV_USE_OS == LV_OS_PTHREAD
17 
18 #include <pthread.h>
19 #include <semaphore.h>
20 #include <stdbool.h>
21 
22 /*********************
23  *      DEFINES
24  *********************/
25 
26 /**********************
27  *      TYPEDEFS
28  **********************/
29 typedef struct {
30     pthread_t thread;
31     void (*callback)(void *);
32     void * user_data;
33 } lv_thread_t;
34 
35 typedef pthread_mutex_t lv_mutex_t;
36 
37 typedef struct {
38     pthread_mutex_t mutex;
39     pthread_cond_t cond;
40     bool v;
41 } lv_thread_sync_t;
42 
43 /**********************
44  * GLOBAL PROTOTYPES
45  **********************/
46 
47 /**********************
48  *      MACROS
49  **********************/
50 
51 #endif /*LV_USE_OS == LV_OS_PTHREAD*/
52 
53 #ifdef __cplusplus
54 } /*extern "C"*/
55 #endif
56 
57 #endif /*LV_PTHREAD_H*/
58