diff --git a/moo/kernel/System.moo b/moo/kernel/System.moo index af6db13..39196b0 100644 --- a/moo/kernel/System.moo +++ b/moo/kernel/System.moo @@ -172,7 +172,7 @@ class System(Apex) /* TODO: end redo */ caller terminate. - //(Processor _processById: 1) resume. <---- i shouldn't do ths. but, this system causes VM assertion failure. fix it.... + (Processor _processById: 1) resume. //<---- i shouldn't do ths. but, this system causes VM assertion failure. fix it.... System logNl: '>>>>End of OS signal handler process ' & (thisProcess id) asString. ]. diff --git a/moo/lib/exec.c b/moo/lib/exec.c index 9ee4d0d..331d462 100644 --- a/moo/lib/exec.c +++ b/moo/lib/exec.c @@ -537,6 +537,8 @@ static MOO_INLINE void chain_into_semaphore (moo_t* moo, moo_oop_process_t proc, /* a process chained to a semaphore cannot get chained to * a semaphore again. a process can get chained to a single semaphore * or a single semaphore group only */ + if ((moo_oop_t)proc->sem != moo->_nil) return; /* ignore it if it happens anyway. TODO: is it desirable???? */ + MOO_ASSERT (moo, (moo_oop_t)proc->sem == moo->_nil); MOO_ASSERT (moo, (moo_oop_t)proc->sem_wait.prev == moo->_nil); MOO_ASSERT (moo, (moo_oop_t)proc->sem_wait.next == moo->_nil);