Skip to content
Permalink
Browse files
8254696: safepointMechanism_aix needs adaptation for JDK-8253180
Reviewed-by: dholmes, clanger
  • Loading branch information
TheRealMDoerr committed Oct 14, 2020
1 parent b509e31 commit 9eeeb8a20f62bcb546627c524892ed09875d18cf
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/hotspot/os/aix/safepointMechanism_aix.cpp
@@ -37,6 +37,10 @@ void SafepointMechanism::pd_initialize() {
return;
}

// Poll bit values
_poll_word_armed_value = poll_bit();
_poll_word_disarmed_value = ~_poll_word_armed_value;

// Allocate one protected page
char* map_address = (char*)MAP_FAILED;
const size_t page_size = os::vm_page_size();
@@ -104,8 +108,8 @@ void SafepointMechanism::pd_initialize() {
if (!os::guard_memory((char*)_polling_page, page_size)) {
fatal("Could not protect polling page");
}
intptr_t bad_page_val = reinterpret_cast<intptr_t>(map_address),
good_page_val = bad_page_val + os::vm_page_size();
_poll_armed_value = reinterpret_cast<void*>(bad_page_val + poll_bit());
_poll_disarmed_value = reinterpret_cast<void*>(good_page_val);
uintptr_t bad_page_val = reinterpret_cast<uintptr_t>(map_address),
good_page_val = bad_page_val + os::vm_page_size();
_poll_page_armed_value = bad_page_val + poll_bit();
_poll_page_disarmed_value = good_page_val;
}

1 comment on commit 9eeeb8a

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 9eeeb8a Oct 14, 2020

Please sign in to comment.