src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/library_call.cpp Tue Feb 25 17:39:24 2014
--- new/src/share/vm/opto/library_call.cpp Tue Feb 25 17:39:24 2014
*** 3234,3244 ****
--- 3234,3245 ----
//------------------------inline_native_isInterrupted------------------
// private native boolean java.lang.Thread.isInterrupted(boolean ClearInterrupted);
bool LibraryCallKit::inline_native_isInterrupted() {
// Add a fast path to t.isInterrupted(clear_int):
- // (t == Thread.current() && (!TLS._osthread._interrupted || !clear_int))
+ // (!TLS._osthread._interrupted || WINDOWS_ONLY(false) NOT_WINDOWS(!clear_int)))
// ? TLS._osthread._interrupted : /*slow path:*/ t.isInterrupted(clear_int)
// So, in the common case that the interrupt bit is false,
// we avoid making a call into the VM. Even if the interrupt bit
// is true, if the clear_int argument is false, we avoid the VM call.
// However, if the receiver is not currentThread, we must call the VM,
*** 3297,3306 ****
--- 3298,3313 ----
Node* clr_arg = argument(1);
Node* cmp_arg = _gvn.transform(new (C) CmpINode(clr_arg, intcon(0)));
Node* bol_arg = _gvn.transform(new (C) BoolNode(cmp_arg, BoolTest::ne));
IfNode* iff_arg = create_and_map_if(control(), bol_arg, PROB_FAIR, COUNT_UNKNOWN);
+ #ifdef TARGET_OS_FAMILY_windows
+ // To return true on Windows you must read the _interrupted field
+ // and check the the event state i.e. take the slow path.
+ result_rgn->init_req(no_clear_result_path, top());
+ result_val->init_req(no_clear_result_path, top());
+ #else
// Second fast path: ... else if (!clear_int) return true;
Node* false_arg = _gvn.transform(new (C) IfFalseNode(iff_arg));
result_rgn->init_req(no_clear_result_path, false_arg);
result_val->init_req(no_clear_result_path, intcon(1));
*** 3308,3317 ****
--- 3315,3325 ----
set_control( _gvn.transform(new (C) IfTrueNode(iff_arg)));
// (d) Otherwise, go to the slow path.
slow_region->add_req(control());
set_control( _gvn.transform(slow_region));
+ #endif
if (stopped()) {
// There is no slow path.
result_rgn->init_req(slow_result_path, top());
result_val->init_req(slow_result_path, top());
src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File