equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
45 // If the poll is on a non-java thread we can only check the global state. |
45 // If the poll is on a non-java thread we can only check the global state. |
46 return global_poll(); |
46 return global_poll(); |
47 } |
47 } |
48 } |
48 } |
49 |
49 |
50 bool SafepointMechanism::poll(Thread* thread) { |
50 bool SafepointMechanism::should_block(Thread* thread) { |
51 if (uses_thread_local_poll()) { |
51 if (uses_thread_local_poll()) { |
52 return local_poll(thread); |
52 return local_poll(thread); |
53 } else { |
53 } else { |
54 return global_poll(); |
54 return global_poll(); |
55 } |
55 } |