Commit 1de21d0e by Bryce McKinlay

posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use write_barrier, not release_set.

	* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use write_barrier,
	not release_set.
	* sysdep/powerpc/locks.h (write_barrier): New function.
	* sysdep/i386/locks.h (write_barrier): New function.

From-SVN: r51101
parent e5c4bd1b
2002-03-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use write_barrier,
not release_set.
* sysdep/powerpc/locks.h (write_barrier): New function.
* sysdep/i386/locks.h (write_barrier): New function.
2002-03-19 Martin Kahlert <martin.kahlert@infineon.com>
* include/jni.h Use correct C comments
* include/jni.h Use correct C comments.
2002-03-18 Tom Tromey <tromey@redhat.com>
......
......@@ -448,7 +448,8 @@ _Jv_ThreadSelf_out_of_line(volatile self_cache_entry *sce, size_t high_sp_bits)
{
pthread_t self = pthread_self();
sce -> high_sp_bits = high_sp_bits;
release_set ((obj_addr_t *) &(sce -> self), self);
write_barrier();
sce -> self = self;
return self;
}
......
......@@ -62,4 +62,12 @@ read_barrier()
{
}
// Ensure that prior stores to memory are completed with respect to other
// processors.
inline static void
write_barrier()
{
// X86 does not reorder writes. We just need to ensure that gcc also doesn't.
__asm__ __volatile__(" " : : : "memory");
}
#endif
......@@ -75,4 +75,12 @@ read_barrier()
__asm__ __volatile__ ("isync" : : : "memory");
}
// Ensure that prior stores to memory are completed with respect to other
// processors.
inline static void
write_barrier()
{
__asm__ __volatile__ ("sync" : : : "memory");
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment