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