This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: natThread.cc: Destroy join sync objects in finalizer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]