static void threadJoin(Thread *thread) { auto cthread = *thread->thisObject()->val<std::thread*>(); allowGC(); cthread->join(); disallowGCAndPauseIfNeeded(); thread->returnFromFunction(); }
static void mutexLock(Thread *thread) { allowGC(); (*thread->thisObject()->val<std::mutex*>())->lock(); disallowGCAndPauseIfNeeded(); thread->returnFromFunction(); }
static Something threadJoin(Thread *thread) { allowGC(); bool l = pthread_join(*(pthread_t *)((Object *)stackGetThisObject(thread))->value, NULL) == 0; disallowGCAndPauseIfNeeded(); return l ? EMOJICODE_TRUE : EMOJICODE_FALSE; }