harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Rebriy" <pavel.reb...@gmail.com>
Subject Re: [drlvm][threading] questions about H3413, Refactoring exception safepoint callback
Date Tue, 20 Mar 2007 06:49:22 GMT
There is a contract between disable_count value and Java code execution:
during Java code execution disable_count should be equal to 1. It means that
garbage collection could have place only within suspension safe points or
within VM helpers.

Execution of safepoint callback function could call Java code. That is
disable_count should be set to 1 before callback function execution.

Field disable_count cannot be changed by another thread. It value changes
only by the same thread. So there is no race condition or separate usage in
setting disable_count to 1.

On 19/03/07, Weldon Washburn <weldonwjw@gmail.com> wrote:
>
> Pavel,
>
> The code in this patch looks much better than the original code.  Thanks
> for
> focusing on cleaning this code up.
>
> A question about the use of  the disable_count field in struct hythread_t.
> I notice in hythread_exception_safe_point() that the old value of this
> field
> is saved.  The field is then specifically set to a value of one and once
> the
> exception callback is processed, the field is returned to its original
> value.  Is this a case where disable_count is actually be overloaded with
> another use?  Would it make sense to split the two uses into two seperate,
> distinct fields??
>
> --
> Weldon Washburn
> Intel Enterprise Solutions Software Division
>



-- 
Best regards,
Pavel Rebriy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message