mirror of https://gitlab.com/nakst/essence
fix bugs
This commit is contained in:
parent
f8c4f764df
commit
8a9d52ea23
|
@ -4596,11 +4596,11 @@ int ExternalCharacterToByte(ExecutionContext *context, Value *returnValue) {
|
||||||
|
|
||||||
void ExternalCoroutineDone(CoroutineState *coroutine) {
|
void ExternalCoroutineDone(CoroutineState *coroutine) {
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
sem_post(&externalCoroutineSemaphore);
|
|
||||||
pthread_mutex_lock(&externalCoroutineMutex);
|
pthread_mutex_lock(&externalCoroutineMutex);
|
||||||
coroutine->nextExternalCoroutine = externalCoroutineUnblockedList;
|
coroutine->nextExternalCoroutine = externalCoroutineUnblockedList;
|
||||||
externalCoroutineUnblockedList = coroutine;
|
externalCoroutineUnblockedList = coroutine;
|
||||||
pthread_mutex_unlock(&externalCoroutineMutex);
|
pthread_mutex_unlock(&externalCoroutineMutex);
|
||||||
|
sem_post(&externalCoroutineSemaphore);
|
||||||
#else
|
#else
|
||||||
(void) coroutine;
|
(void) coroutine;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue