1625N/A * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 342N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 342N/A * This code is free software; you can redistribute it and/or modify it 342N/A * under the terms of the GNU General Public License version 2 only, as 342N/A * published by the Free Software Foundation. 342N/A * This code is distributed in the hope that it will be useful, but WITHOUT 342N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 342N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 342N/A * version 2 for more details (a copy is included in the LICENSE file that 342N/A * accompanied this code). 342N/A * You should have received a copy of the GNU General Public License version 342N/A * 2 along with this work; if not, write to the Free Software Foundation, 342N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 342N/A // Set the entry to null, so we don't do it again (via the test 342N/A // above) if we reconsider this buffer. 342N/A#
ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away 795N/A// Determines how many mutator threads can process the buffers in parallel. 342N/A // Used to determine if we had already claimed a par_id 342N/A // before entering this method. 342N/A // We grab the current JavaThread. 342N/A // We get the the number of any par_id that this thread 342N/A // might have already claimed. 342N/A // If worker_i is not -1 then the thread has already claimed 342N/A // a par_id. We make note of it using the already_claimed value 342N/A // Otherwise we need to claim a par id 342N/A // And store the par_id value in the thread 342N/A // If we had not claimed an id before entering the method 342N/A // then we must release the id. 342N/A // and set the claimed_id in the thread to -1 342N/A return true;
// In normal case, go on to next buffer. 1625N/A// Deallocates any completed log buffers 342N/A // Since abandon is done only at safepoints, we can safely manipulate 342N/A // Iterate over all the threads, if we find a partial log add it to 342N/A // the global list of logs. Temporarily turn off the limit on the number 342N/A // of outstanding buffers. 342N/A // We must NULL out the unused entries, then enqueue. 342N/A // Restore the completed buffer queue limit.