equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2016, 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. |
58 } |
58 } |
59 |
59 |
60 void ConcurrentGCThread::wait_for_universe_init() { |
60 void ConcurrentGCThread::wait_for_universe_init() { |
61 MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); |
61 MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); |
62 while (!is_init_completed() && !_should_terminate) { |
62 while (!is_init_completed() && !_should_terminate) { |
63 CGC_lock->wait(Mutex::_no_safepoint_check_flag, 200); |
63 CGC_lock->wait(Mutex::_no_safepoint_check_flag, 1); |
64 } |
64 } |
65 } |
65 } |
66 |
66 |
67 void ConcurrentGCThread::terminate() { |
67 void ConcurrentGCThread::terminate() { |
68 assert(_should_terminate, "Should only be called on terminate request."); |
68 assert(_should_terminate, "Should only be called on terminate request."); |