http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55273
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-07
10:06:56 UTC ---
Reduced testcase:
extern int debug_threads;
extern void sigsuspend (void);
void my_waitpid (int flags, int wnohang)
{
while (1)
{
if (flags & 0x80000000)
{
if (wnohang)
break;
if (debug_threads)
__builtin_puts ("blocking\n");
sigsuspend ();
}
flags ^= 0x80000000;
}
}
