[LTP] [PATCH 1/2] syscalls/tkill: Convert tkill01 to the new API
Petr Vorel
pvorel@suse.cz
Wed Apr 28 20:04:35 CEST 2021
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
More information about the ltp
mailing list