< prev index next >
src/hotspot/os/bsd/os_bsd.cpp
Print this page
*** 49,59 ****
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
- #include "runtime/orderAccess.hpp"
#include "runtime/osThread.hpp"
#include "runtime/perfMemory.hpp"
#include "runtime/semaphore.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/statSampler.hpp"
--- 49,58 ----
*** 3207,3217 ****
#ifdef __APPLE__
static volatile int* volatile apic_to_processor_mapping = NULL;
static volatile int next_processor_id = 0;
static inline volatile int* get_apic_to_processor_mapping() {
! volatile int* mapping = OrderAccess::load_acquire(&apic_to_processor_mapping);
if (mapping == NULL) {
// Calculate possible number space for APIC ids. This space is not necessarily
// in the range [0, number_of_processors).
uint total_bits = 0;
for (uint i = 0;; ++i) {
--- 3206,3216 ----
#ifdef __APPLE__
static volatile int* volatile apic_to_processor_mapping = NULL;
static volatile int next_processor_id = 0;
static inline volatile int* get_apic_to_processor_mapping() {
! volatile int* mapping = Atomic::load_acquire(&apic_to_processor_mapping);
if (mapping == NULL) {
// Calculate possible number space for APIC ids. This space is not necessarily
// in the range [0, number_of_processors).
uint total_bits = 0;
for (uint i = 0;; ++i) {
*** 3238,3248 ****
mapping[i] = -1;
}
if (!Atomic::replace_if_null(mapping, &apic_to_processor_mapping)) {
FREE_C_HEAP_ARRAY(int, mapping);
! mapping = OrderAccess::load_acquire(&apic_to_processor_mapping);
}
}
return mapping;
}
--- 3237,3247 ----
mapping[i] = -1;
}
if (!Atomic::replace_if_null(mapping, &apic_to_processor_mapping)) {
FREE_C_HEAP_ARRAY(int, mapping);
! mapping = Atomic::load_acquire(&apic_to_processor_mapping);
}
}
return mapping;
}
< prev index next >