From 22044b48baa8a3c3fe67ab912e9f34a80c97880b Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 23 Aug 2011 23:24:01 -0700 Subject: Fix nptl/tst-cancel17 and nptl/tst-cancelx17 with recent gcc. --- ChangeLog | 4 ++++ sysdeps/pthread/aio_suspend.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f14b70ad92..5399dcfeb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing diff --git a/sysdeps/pthread/aio_suspend.c b/sysdeps/pthread/aio_suspend.c index b85b16d10e..99f3a80c52 100644 --- a/sysdeps/pthread/aio_suspend.c +++ b/sysdeps/pthread/aio_suspend.c @@ -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) @@ -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); -- cgit 1.4.1