harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [drlvm][threading] Possible race condition in implementation of conditional variables?
Date Fri, 13 Oct 2006 05:50:49 GMT
GC should be enabled in waiting state. In case that a GC can happen,
the code should do bookkeeping to guarantee the correctness.

Thanks,
xiaofeng

On 10/13/06, Evgueni Brevnov <evgueni.brevnov@gmail.com> wrote:
> Hi,
>
> I do the following:
>
> hythread_suspend_disable();
> <do unsafe actions>
> hysem_wait(semaphore);
> <do unsafe actions>
> hythread_suspend_enable();
>
> By saying hythread_suspend_disable(); I expect the thread can't be
> suspended until hythread_suspend_enable() is called. But hysem_wait()
> resets disabled mode and enables thread suspension. As a result GC can
> happen when it must not. hysem_wait is based on conditional variables
> so the same can happen when conditional variables is used.
>
> Do you see the problem here? Or I miss something?
>
> Thanks
> Evgueni
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message