All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] syscalls/tkill: Convert tkill01 to the new API
Date: Wed, 28 Apr 2021 20:04:35 +0200	[thread overview]
Message-ID: <YImjs5KVqFFjDqw/@pevik> (raw)
In-Reply-To: <YIlRAanTIk9uKVEP@yuki>

Hi Cyril, Xie,

> > > +int sig_flag = 0;

> > It should be
> > static int sig_flag;

> It has to be volatile as well, if we are waiting in a bussy loop on it
> and it's changed ansynchronously from a signal handler, otherwise
> compiler may misoptimize the code.

> Generally the code that waits for a signal should look like:

> static volatile sig_atomic_t sig_flag;

Oh, yes, volatile. Thanks for other hints, code adjusted and whole patchset
merged.

Kind regards,
Petr

  reply	other threads:[~2021-04-28 18:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22  6:57 [LTP] [PATCH 0/2] syscalls/tkill: Convert tkill{01, 02} to the new API Xie Ziyao
2021-04-22  6:57 ` [LTP] [PATCH 1/2] syscalls/tkill: Convert tkill01 " Xie Ziyao
2021-04-26 10:31   ` Petr Vorel
2021-04-26 11:24     ` xieziyao
2021-04-26 12:55       ` Petr Vorel
2021-04-27  1:49         ` xieziyao
2021-04-28 12:11     ` Cyril Hrubis
2021-04-28 18:04       ` Petr Vorel [this message]
2021-04-29  2:02         ` xieziyao
2021-04-22  6:57 ` [LTP] [PATCH 2/2] syscalls/tkill: Convert tkill02 " Xie Ziyao
2021-04-26 11:12   ` Petr Vorel
2021-04-26 11:35     ` xieziyao

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=YImjs5KVqFFjDqw/@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.