Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix nptl/tst-cancel17 and nptl/tst-cancelx17 with recent gcc.
  • Loading branch information
David S. Miller committed Aug 24, 2011
1 parent 2c0b250 commit 22044b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -6,6 +6,10 @@
%sp not %fp in calculations.
(_JMPBUF_UNWINDS_ADJ): Likewise.

* sysdeps/pthread/aio_suspend.c (do_aio_misc_wait): New function.
(aio_suspend): Call it to force an exception region around the
AIO_MISC_WAIT() invocation.

2011-08-23 Andreas Schwab <schwab@redhat.com>

* sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing
Expand Down
14 changes: 13 additions & 1 deletion sysdeps/pthread/aio_suspend.c
Expand Up @@ -92,6 +92,18 @@ cleanup (void *arg)
pthread_mutex_unlock (&__aio_requests_mutex);
}

#ifdef DONT_NEED_AIO_MISC_COND
static int
__attribute__ ((noinline))
do_aio_misc_wait(int *cntr, const struct timespec *timeout)
{
int result = 0;

AIO_MISC_WAIT(result, *cntr, timeout, 1);

return result;
}
#endif

int
aio_suspend (list, nent, timeout)
Expand Down Expand Up @@ -169,7 +181,7 @@ aio_suspend (list, nent, timeout)
pthread_cleanup_push (cleanup, &clparam);

#ifdef DONT_NEED_AIO_MISC_COND
AIO_MISC_WAIT (result, cntr, timeout, 1);
result = do_aio_misc_wait(&cntr, timeout);
#else
if (timeout == NULL)
result = pthread_cond_wait (&cond, &__aio_requests_mutex);
Expand Down

0 comments on commit 22044b4

Please sign in to comment.