From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3890 invoked by alias); 18 Nov 2019 11:05:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 3882 invoked by uid 89); 18 Nov 2019 11:05:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=queue-full, queuefull X-HELO: esa2.mentor.iphmx.com Received: from esa2.mentor.iphmx.com (HELO esa2.mentor.iphmx.com) (68.232.141.98) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Nov 2019 11:05:41 +0000 IronPort-SDR: 7bWk34VB0lXnXjtO/a+qMFYsNaqNg04Hr01DGWZJ5nvV8AEwvtx97fUM6dUHmbkirYbJPloo5P xthNXGgishJZ4Xk8SldGebijCjL8oIz0i0Q2373EPC13Al3kP4xKAW4Yp42Dk8haktUJN9fMb3 /auXPSDgascnHHPl0YD5OBNjCESSqSslo1IyWmVcGk03V2isQ4vxeBn8mjC1+Nq9B9aVs6Nbu3 hVLQL5mZKB2ELh+PW5g+4t2BqfyNWdEZPSHEsLJrmbrpqz1FCHK4u+8XT4TvtbjGpgAOb5YfV4 RjM= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 18 Nov 2019 03:05:39 -0800 IronPort-SDR: j6RMJP3P76IV2IiCP5IEv2xQ5OqjdzqaaXK6OL4bcTbPSfw1vxkUCYeiv6GZCzEkAzZgzmR4Br K1OHlpguT+1LpIGMA/Sj/HkXUtY+l18sWHnMHzDT/tMYu4u7RiREE//gyXfYiGBjr3jnfKwYTl w6B9LoyqC6iYT0uu9KBRNrPnCzu87lNHKtcTZDb4bsuPrS2o7HaH3xT81do71fw/r7+gZafmkE baHtg0liTkYWZAugUzi1wtdOMFWYOkWsy/bLCvSvl81rFCJpQHIXqawQ2y7FtMBpbzTtLbTO4J z1c= Subject: Re: [PATCH 09/13] AMD GCN libgomp plugin queue-full condition locking fix To: Julian Brown , CC: , , References: From: Andrew Stubbs Message-ID: Date: Mon, 18 Nov 2019 11:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-Path: ams@codesourcery.com X-SW-Source: 2019-11/txt/msg01687.txt.bz2 On 15/11/2019 21:44, Julian Brown wrote: > @@ -2732,13 +2732,9 @@ wait_for_queue_nonfull (struct goacc_asyncqueue *aq) > { > if (aq->queue_n == ASYNC_QUEUE_SIZE) > { > - pthread_mutex_lock (&aq->mutex); > - > /* Queue is full. Wait for it to not be full. */ > while (aq->queue_n == ASYNC_QUEUE_SIZE) > pthread_cond_wait (&aq->queue_cond_out, &aq->mutex); > - > - pthread_mutex_unlock (&aq->mutex); > } > } If wait_for_queue_nonfull requires the mutex locked on entry then the comment above the function should say so. Otherwise this looks fine. Andrew