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
This commit is contained in:
parent
e5c4bd1bba
commit
1de21d0eac
@ -1,6 +1,13 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user