[PATCH]: natThread.cc: Destroy join sync objects in finalizer
Bryce McKinlay
mckinlay@redhat.com
Sat Sep 18 11:43:00 GMT 2004
Tom Tromey wrote:
>Bryce> Right, with my scheme above, no extra synchronization would be
>Bryce> needed. It would still be safe to synchronize on the native state
>Bryce> (join_mutex, etc), if thread->nt is non-null. The native state would
>Bryce> not be destroyed until its finializer is run, so if a thread sees it
>Bryce> as non-null, there is no danger of a race.
>
>Perhaps you need to synchronize when changing the value of thread->nt.
>I suppose there are other places where we assume pointer writes are
>atomic.
>
Arn't pointer writes atomic on all platforms we support?
Bryce
More information about the Java-patches
mailing list