Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

mips WIFSTOPPED macro evaluates argument twice

$
0
0
Hi,

The recent changes to fix the WIFSTOPPED macro on mips for SIG_127
issues has introduced a regression: WIFSTOPPED now evaluates its
argument more than once. While probably not a big deal, I did manage
to work out a version that only evaluates the argument once, which we
are now using in musl:

#define WIFSTOPPED(s) ((short)((((s)팗?)*0x10001)>>8) > 0x7f00)

The idea is basically just flipping the low/high bytes then doing a
range comparison against the range [0x7f01,0x7fff].

Rich

Viewing all articles
Browse latest Browse all 6551

Latest Images

Trending Articles



Latest Images