mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
sync pika_lvgl pkg
This commit is contained in:
parent
9a5c80d802
commit
d5796cd56e
@ -29,7 +29,7 @@
|
||||
PikaObj* pika_lv_event_listener_g;
|
||||
Args* pika_lv_id_register_g;
|
||||
extern PikaEventListener* g_pika_lv_timer_event_listener;
|
||||
pika_platform_thread_mutex_t pika_lv_global_mutex_g = {0};
|
||||
pika_thread_recursive_mutex_t pika_lv_global_mutex_g = {0};
|
||||
|
||||
#if !PIKASCRIPT_VERSION_REQUIRE_MINIMUN(1, 13, 2)
|
||||
#error "pikascript version must be greater than 1.13.2"
|
||||
@ -59,7 +59,7 @@ void pika_lvgl_lock(PikaObj* self) {
|
||||
if (!g_lvgl_inited) {
|
||||
return;
|
||||
}
|
||||
pika_platform_thread_mutex_lock(&pika_lv_global_mutex_g);
|
||||
pika_thread_recursive_mutex_lock(&pika_lv_global_mutex_g);
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
@ -70,7 +70,7 @@ void pika_lvgl_unlock(PikaObj* self) {
|
||||
if (!g_lvgl_inited) {
|
||||
return;
|
||||
}
|
||||
pika_platform_thread_mutex_unlock(&pika_lv_global_mutex_g);
|
||||
pika_thread_recursive_mutex_unlock(&pika_lv_global_mutex_g);
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
@ -241,7 +241,7 @@ void pika_lvgl___init__(PikaObj* self) {
|
||||
if (!g_lvgl_inited) {
|
||||
#if PIKA_LVGL_THREAD_LOCK_ENABLE
|
||||
pika_debug("Init pika_lv_global_mutex_g");
|
||||
pika_platform_thread_mutex_init(&pika_lv_global_mutex_g);
|
||||
pika_thread_recursive_mutex_init(&pika_lv_global_mutex_g);
|
||||
#endif
|
||||
pika_lvgl_lock(NULL);
|
||||
lv_png_init();
|
||||
|
@ -803,7 +803,7 @@ PIKA_WEAK int pika_platform_thread_mutex_destroy(
|
||||
WEAK_FUNCTION_NEED_OVERRIDE_ERROR(_);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
int pika_thread_recursive_mutex_init(pika_thread_recursive_mutex_t* m) {
|
||||
int ret = pika_platform_thread_mutex_init(&m->mutex);
|
||||
|
@ -2,4 +2,4 @@
|
||||
#define PIKA_VERSION_MINOR 13
|
||||
#define PIKA_VERSION_MICRO 2
|
||||
|
||||
#define PIKA_EDIT_TIME "2024/02/19 23:45:36"
|
||||
#define PIKA_EDIT_TIME "2024/02/19 23:56:25"
|
||||
|
Loading…
x
Reference in New Issue
Block a user