diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/pt-system.c | 5 | ||||
-rw-r--r-- | nptl/pthreadP.h | 7 | ||||
-rw-r--r-- | nptl/tst-cancel-wrappers.sh | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/nptl/pt-system.c b/nptl/pt-system.c index f638a6ae32..b3b45ab938 100644 --- a/nptl/pt-system.c +++ b/nptl/pt-system.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -28,3 +28,6 @@ system (const char *line) { return __libc_system (line); } + +/* __libc_system in libc.so handles cancellation. */ +LIBC_CANCEL_HANDLED (); diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index e4851288fb..b298524245 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -92,12 +92,19 @@ extern int __pthread_debug attribute_hidden; /* Same as CANCEL_RESET, but for use in libc.so. */ # define LIBC_CANCEL_RESET(oldtype) \ __libc_disable_asynccancel (oldtype) +# define LIBC_CANCEL_HANDLED() \ + __asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \ + __asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel") #elif defined NOT_IN_libc && defined IS_IN_libpthread # define LIBC_CANCEL_ASYNC() CANCEL_ASYNC () # define LIBC_CANCEL_RESET(val) CANCEL_RESET (val) +# define LIBC_CANCEL_HANDLED() \ + __asm (".globl " __SYMBOL_PREFIX "__pthread_enable_asynccancel"); \ + __asm (".globl " __SYMBOL_PREFIX "__pthread_disable_asynccancel") #else # define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */ # define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */ +# define LIBC_CANCEL_HANDLED() /* Nothing. */ #endif diff --git a/nptl/tst-cancel-wrappers.sh b/nptl/tst-cancel-wrappers.sh index 5b3944bab7..4561c02ae8 100644 --- a/nptl/tst-cancel-wrappers.sh +++ b/nptl/tst-cancel-wrappers.sh @@ -67,8 +67,7 @@ C["__xpg_sigpause"]=1 /:$/ { if (seen) { - # pt-system.o* in NPTL calls __libc_system directly. - if ((!seen_enable || !seen_disable) && !(object ~ /^pt-system.o/)) + if (!seen_enable || !seen_disable) { printf "in '$1'(%s) %s'\''s cancellation missing\n", object, seen ret = 1 |