add EVENT_THREAD_ENABLE config

This commit is contained in:
pikastech 2023-03-02 18:08:07 +08:00
parent 689deb4986
commit 1d8e1cfb79
2 changed files with 11 additions and 0 deletions

View File

@ -1944,6 +1944,7 @@ void _do_pks_eventListener_send(PikaEventListener* self,
_VMEvent_pickupEvent();
}
}
#if PIKA_EVENT_THREAD_ENABLE
if (PikaVMSignal.event_thread_inited) {
return;
}
@ -1956,6 +1957,7 @@ void _do_pks_eventListener_send(PikaEventListener* self,
PikaVMSignal.event_thread_inited = 1;
}
#endif
#endif
}
void pks_eventListener_send(PikaEventListener* self,

View File

@ -76,6 +76,11 @@
#ifdef PIKA_TYPE_FULL_FEATURE_ENABLE
#define PIKA_TYPE_FULL_FEATURE_ENABLE 0
#endif
#ifndef PIKA_EVENT_THREAD_ENABLE
#define PIKA_EVENT_THREAD_ENABLE 0
#endif
#endif
/* default optimize */
@ -418,6 +423,10 @@
#define PIKA_TYPE_FULL_FEATURE_ENABLE 1
#endif
#ifndef PIKA_EVENT_THREAD_ENABLE
#define PIKA_EVENT_THREAD_ENABLE 1
#endif
/* configuration validation */
#endif