mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
6822204: volatile fences should prefer lock:addl to actual mfence instructions
Reviewed-by: kvn, phh
This commit is contained in:
parent
a5396e1107
commit
134debb0ba
20 changed files with 81 additions and 183 deletions
|
@ -26,3 +26,15 @@
|
|||
# include "incls/_orderAccess.cpp.incl"
|
||||
|
||||
volatile intptr_t OrderAccess::dummy = 0;
|
||||
|
||||
void OrderAccess::StubRoutines_fence() {
|
||||
// Use a stub if it exists. It may not exist during bootstrap so do
|
||||
// nothing in that case but assert if no fence code exists after threads have been created
|
||||
void (*func)() = CAST_TO_FN_PTR(void (*)(), StubRoutines::fence_entry());
|
||||
|
||||
if (func != NULL) {
|
||||
(*func)();
|
||||
return;
|
||||
}
|
||||
assert(Threads::number_of_threads() == 0, "for bootstrap only");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue