public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Julian Brown <julian@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [PATCH] Tidy up locking for libgomp OpenACC entry points
Date: Thu, 23 Apr 2015 08:32:00 -0000	[thread overview]
Message-ID: <20150423083211.GA1751@tucnak.redhat.com> (raw)
In-Reply-To: <20150422194243.115f26fa@octopus>

On Wed, Apr 22, 2015 at 07:42:43PM +0100, Julian Brown wrote:
> @@ -120,25 +116,32 @@ acc_free (void *d)
>  {
>    splay_tree_key k;
>    struct goacc_thread *thr = goacc_thread ();
> +  struct gomp_device_descr *acc_dev = thr->dev;

IMHO you want to move this line after:

>  
>    if (!d)
>      return;
>  
>    assert (thr && thr->dev);

the assert.  Supposedly also the thr = line after the return; line,
no need to do it if returning early.  As gcc now defaults to -std=gnu11
for C, libgomp is written in C11 and you don't need to limit to C89 (and
even back then, it was compiled by gcc and thus you could use GNU
extensions, such as mixed declarations and code).

Otherwise, I have no problem with this going to trunk, if Thomas is ok with
it.

	Jakub

  reply	other threads:[~2015-04-23  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 18:43 Julian Brown
2015-04-23  8:32 ` Jakub Jelinek [this message]
2015-04-23 16:42 ` Thomas Schwinge
2015-04-24 17:13   ` Julian Brown
2015-04-29 17:47     ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150423083211.GA1751@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=julian@codesourcery.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).