Index: trunk/vm/thread/src/thread_native_park.c =================================================================== --- trunk/vm/thread/src/thread_native_park.c (revision 454702) +++ trunk/vm/thread/src/thread_native_park.c (working copy) @@ -47,9 +47,17 @@ * @see hythread_unpark */ IDATA VMCALL hythread_park(I_64 millis, IDATA nanos) { + IDATA status; hythread_t t = tm_self_tls; assert(t); - return hysem_wait_interruptable(t->park_event, millis, nanos); + status = hysem_wait_interruptable(t->park_event, millis, nanos); + //the status should be restored for j.u.c.LockSupport + //// + if (status == TM_ERROR_INTERRUPT) { + t->state |= TM_THREAD_STATE_INTERRUPTED; + } + + return status; } /** Index: trunk/vm/thread/src/thread_native_condvar.c =================================================================== --- trunk/vm/thread/src/thread_native_condvar.c (revision 454702) +++ trunk/vm/thread/src/thread_native_condvar.c (working copy) @@ -59,6 +59,8 @@ // check interrupted flag if (interruptable && (this_thread->state & TM_THREAD_STATE_INTERRUPTED)) { + // clean interrupted flag + this_thread->state &= (~TM_THREAD_STATE_INTERRUPTED); return TM_ERROR_INTERRUPT; } @@ -74,6 +76,8 @@ // check interrupted flag if (interruptable && (this_thread->state & TM_THREAD_STATE_INTERRUPTED)) { + // clean interrupted flag + this_thread->state &= (~TM_THREAD_STATE_INTERRUPTED); return TM_ERROR_INTERRUPT; }