diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-16 20:52:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-16 20:52:36 +0000 |
commit | 9634cf9d4f30861dbf3ee057a1219227d8c8f19d (patch) | |
tree | f00a24f7e4d536c1bf4771e98150503222dc765b /nptl | |
parent | e150fddc7c1024447a9489635f6f2071a6bfdfcc (diff) | |
download | glibc-9634cf9d4f30861dbf3ee057a1219227d8c8f19d.tar.gz glibc-9634cf9d4f30861dbf3ee057a1219227d8c8f19d.tar.xz glibc-9634cf9d4f30861dbf3ee057a1219227d8c8f19d.zip |
Update.
2002-12-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/i386/socket.S: Use CENABLE and CDISABLE macros instead of doing the calls directly. * sysdeps/unix/make-syscalls.sh: Add ptw-*.$o target name to rules. * Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for ptw-% targets. 2002-12-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/fpu/bits/mathinline.h: Backout last change. * sysdeps/ieee754/bits/nan.h: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list (__syscall_open, __syscall_wait4, __syscall_ioctl, __syscall_write): Add.
Diffstat (limited to 'nptl')
35 files changed, 63 insertions, 1274 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index a291a07d57..49c94ee3b3 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,44 @@ +2002-12-16 Jakub Jelinek <jakub@redhat.com> + + * libc-cancellation.c: Guard both function with + #if !defined NOT_IN_libc. + * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the + automatically provided pthread wrappers. + * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to + CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc + nor in libpthread. + * pt-open.c: Removed. + * pt-fcntl.c: Removed. + * pt-fsync.c: Removed. + * pt-lseek.c: Removed. + * pt-msgrcv.c: Removed. + * pt-msgsnd.c: Removed. + * pt-msync.c: Removed. + * pt-nanosleep.c: Removed. + * pt-open64.c: Removed. + * pt-pause.c: Removed. + * pt-pread.c: Removed. + * pt-pread64.c: Removed. + * pt-pwrite.c: Removed. + * pt-pwrite64.c: Removed. + * pt-read.c: Removed. + * pt-recv.c: Removed. + * pt-recvfrom.c: Removed. + * pt-recvmsg.c: Removed. + * pt-send.c: Removed. + * pt-sendto.c: Removed. + * pt-sigtimedwait.c: Removed. + * pt-sigwait.c: Removed. + * pt-wait.c: Removed. + * pt-waitpid.c: Removed. + * pt-write.c: Removed. + * pt-accept.c: Removed. + * pt-close.c: Removed. + * pt-connect.c: Removed. + * pt-lseek64.c: Removed. + * pt-sendmsg.c: Removed. + * pt-tcdrain.c: Removed. + 2002-12-15 Ulrich Drepper <drepper@redhat.com> * init.c (__pthread_initialize_minimal_internal): Renamed from diff --git a/nptl/Makefile b/nptl/Makefile index 409b9dec85..88f038deff 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -94,13 +94,14 @@ libpthread-routines = init events \ lowlevellock lowlevelmutex lowlevelcond lowlevelrwlock \ lowlevelsem \ pt-vfork \ - pt-write pt-read pt-close pt-fcntl pt-accept pt-connect \ - pt-recv pt-recvfrom pt-recvmsg pt-send pt-sendmsg \ - pt-sendto pt-fsync pt-lseek pt-lseek64 pt-msync \ - pt-nanosleep pt-open pt-open64 pt-pause pt-pread \ - pt-pread64 pt-pwrite pt-pwrite64 pt-tcdrain pt-system \ - pt-wait pt-waitpid pt-msgrcv pt-msgsnd pt-sigwait \ - pt-raise \ + ptw-write ptw-read ptw-close ptw-fcntl ptw-accept \ + ptw-connect ptw-recv ptw-recvfrom ptw-recvmsg ptw-send \ + ptw-sendmsg ptw-sendto ptw-fsync ptw-lseek ptw-llseek \ + ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \ + ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \ + ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \ + ptw-sigwait \ + pt-raise pt-system \ flockfile ftrylockfile funlockfile \ sigaction \ herrno res pt-allocrtsig \ diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c index ae568cfa78..1db99ea18a 100644 --- a/nptl/libc-cancellation.c +++ b/nptl/libc-cancellation.c @@ -23,6 +23,8 @@ #include "atomic.h" +#if !defined NOT_IN_libc + /* The next two functions are similar to pthread_setcanceltype() but more specialized for the use in the cancelable functions like write(). They do not need to check parameters etc. */ @@ -82,3 +84,5 @@ __libc_disable_asynccancel (int oldtype) break; } } + +#endif diff --git a/nptl/pt-accept.c b/nptl/pt-accept.c deleted file mode 100644 index 1b25e9eff8..0000000000 --- a/nptl/pt-accept.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -int -accept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len) -{ - int oldtype = CANCEL_ASYNC (); - - int result = __libc_accept (fd, addr, addr_len); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-close.c b/nptl/pt-close.c deleted file mode 100644 index 0edde5ea5d..0000000000 --- a/nptl/pt-close.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -int -__close (int fd) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (close, 1, fd); -#else - int result = __libc_close (fd); -#endif - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__close, close) diff --git a/nptl/pt-connect.c b/nptl/pt-connect.c deleted file mode 100644 index 44d2e3ae21..0000000000 --- a/nptl/pt-connect.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -int -__connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t addr_len) -{ - int oldtype = CANCEL_ASYNC (); - - int result = __libc_connect (fd, addr, addr_len); - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__connect, connect) diff --git a/nptl/pt-fcntl.c b/nptl/pt-fcntl.c deleted file mode 100644 index 7d4a92cea1..0000000000 --- a/nptl/pt-fcntl.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <fcntl.h> -#include <stdarg.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -int -__fcntl (int fd, int cmd, ...) -{ - int oldtype = 0; - va_list ap; - - if (cmd == F_SETLKW) - oldtype = CANCEL_ASYNC (); - - va_start (ap, cmd); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, va_arg (ap, long int)); -#else - int result = __libc_fcntl (fd, cmd, va_arg (ap, long int)); -#endif - - va_end (ap); - - if (cmd == F_SETLKW) - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__fcntl, fcntl) diff --git a/nptl/pt-fsync.c b/nptl/pt-fsync.c deleted file mode 100644 index 91fd266ed9..0000000000 --- a/nptl/pt-fsync.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -int -fsync (int fd) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (fsync, 1, fd); -#else - int result = __libc_fsync (fd); -#endif - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-lseek.c b/nptl/pt-lseek.c deleted file mode 100644 index 9b530ea9e7..0000000000 --- a/nptl/pt-lseek.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -off_t -__lseek (int fd, off_t offset, int whence) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - off_t result = INLINE_SYSCALL (lseek, 3, fd, offset, whence); -#else - off_t result = __libc_lseek (fd, offset, whence); -#endif - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__lseek, lseek) diff --git a/nptl/pt-lseek64.c b/nptl/pt-lseek64.c deleted file mode 100644 index bdedd6e1cf..0000000000 --- a/nptl/pt-lseek64.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -off64_t -lseek64 (int fd, off64_t offset, int whence) -{ - int oldtype = CANCEL_ASYNC (); - - off64_t result = __libc_lseek64 (fd, offset, whence); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-msgrcv.c b/nptl/pt-msgrcv.c deleted file mode 100644 index 383cefaa40..0000000000 --- a/nptl/pt-msgrcv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/msg.h> -#include "pthreadP.h" - - -int -msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg) -{ - int oldtype = CANCEL_ASYNC (); - - int result = __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-msgsnd.c b/nptl/pt-msgsnd.c deleted file mode 100644 index bc09779c2e..0000000000 --- a/nptl/pt-msgsnd.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/msg.h> -#include <ipc_priv.h> -#include "pthreadP.h" - - -int -msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) -{ - int oldtype = CANCEL_ASYNC (); - -#if defined INLINE_SYSCALL && defined __NR_ipc - int result = INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz, - msgflg, (void *) msgp); -#else - int result = __libc_msgsnd (msqid, msgp, msgsz, msgflg); -#endif - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-msync.c b/nptl/pt-msync.c deleted file mode 100644 index 18f3eeb284..0000000000 --- a/nptl/pt-msync.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/mman.h> -#include "pthreadP.h" - - -int -msync (void *addr, size_t length, int flags) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (msync, 3, addr, length, flags); -#else - int result = __libc_msync (addr, length, flags); -#endif - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-nanosleep.c b/nptl/pt-nanosleep.c deleted file mode 100644 index 91f111766a..0000000000 --- a/nptl/pt-nanosleep.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <time.h> -#include "pthreadP.h" - - -int -__nanosleep (const struct timespec *requested_time, struct timespec *remaining) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (nanosleep, 2, requested_time, remaining); -#else - int result = __libc_nanosleep (requested_time, remaining); -#endif - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__nanosleep, nanosleep) diff --git a/nptl/pt-open.c b/nptl/pt-open.c deleted file mode 100644 index be790b8b90..0000000000 --- a/nptl/pt-open.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <stdarg.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -int -__open (const char *pathname, int flags, ...) -{ - va_list ap; - - va_start (ap, flags); - - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (open, 3, pathname, flags, - va_arg (ap, __typeof ((mode_t) 0 + 0))); -#else - int result = __libc_open (pathname, flags, - va_arg (ap, __typeof ((mode_t) 0 + 0))); -#endif - - CANCEL_RESET (oldtype); - - va_end (ap); - - return result; -} -strong_alias (__open, open) diff --git a/nptl/pt-open64.c b/nptl/pt-open64.c deleted file mode 100644 index 27757f5ed4..0000000000 --- a/nptl/pt-open64.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <fcntl.h> -#include <stdlib.h> -#include <stdarg.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -int -__open64 (const char *pathname, int flags, ...) -{ - va_list ap; - - va_start (ap, flags); - - int oldtype = CANCEL_ASYNC (); - -#if defined INLINE_SYSCALL && defined O_LARGEFILE - int result = INLINE_SYSCALL (open, 3, pathname, flags | O_LARGEFILE, - va_arg (ap, __typeof ((mode_t) 0 + 0))); -#else - int result = __libc_open64 (pathname, flags, - va_arg (ap, __typeof ((mode_t) 0 + 0))); -#endif - - CANCEL_RESET (oldtype); - - va_end (ap); - - return result; -} -strong_alias (__open64, open64) diff --git a/nptl/pt-pause.c b/nptl/pt-pause.c deleted file mode 100644 index bb878f0500..0000000000 --- a/nptl/pt-pause.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -int -pause (void) -{ - int oldtype = CANCEL_ASYNC (); - - int result = __libc_pause (); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-pread.c b/nptl/pt-pread.c deleted file mode 100644 index 6169ca8532..0000000000 --- a/nptl/pt-pread.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -ssize_t -pread (int fd, void *buf, size_t count, off_t offset) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_pread (fd, buf, count, offset); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-pread64.c b/nptl/pt-pread64.c deleted file mode 100644 index a80e3e0852..0000000000 --- a/nptl/pt-pread64.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -ssize_t -__pread64 (int fd, void *buf, size_t count, off64_t offset) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_pread64 (fd, buf, count, offset); - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__pread64, pread64) diff --git a/nptl/pt-pwrite.c b/nptl/pt-pwrite.c deleted file mode 100644 index e3906a1868..0000000000 --- a/nptl/pt-pwrite.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -ssize_t -pwrite (int fd, const void *buf, size_t count, off_t offset) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_pwrite (fd, buf, count, offset); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-pwrite64.c b/nptl/pt-pwrite64.c deleted file mode 100644 index 18a9621220..0000000000 --- a/nptl/pt-pwrite64.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -ssize_t -__pwrite64 (int fd, const void *buf, size_t count, off64_t offset) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_pwrite64 (fd, buf, count, offset); - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__pwrite64, pwrite64) diff --git a/nptl/pt-read.c b/nptl/pt-read.c deleted file mode 100644 index 7eaafa0cd6..0000000000 --- a/nptl/pt-read.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -ssize_t -__read (int fd, void *buf, size_t count) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - ssize_t result = INLINE_SYSCALL (read, 3, fd, buf, count); -#else - ssize_t result = __libc_read (fd, buf, count); -#endif - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__read, read) diff --git a/nptl/pt-recv.c b/nptl/pt-recv.c deleted file mode 100644 index 1280447864..0000000000 --- a/nptl/pt-recv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -ssize_t -recv (int fd, __ptr_t buf, size_t n, int flags) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_recv (fd, buf, n, flags); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-recvfrom.c b/nptl/pt-recvfrom.c deleted file mode 100644 index 27d0195297..0000000000 --- a/nptl/pt-recvfrom.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -ssize_t -recvfrom (int fd, __ptr_t buf, size_t n, int flags, __SOCKADDR_ARG addr, - socklen_t *addr_len) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_recvfrom (fd, buf, n, flags, addr, addr_len); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-recvmsg.c b/nptl/pt-recvmsg.c deleted file mode 100644 index e4f7dbfd39..0000000000 --- a/nptl/pt-recvmsg.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -ssize_t -recvmsg (int fd, struct msghdr *message, int flags) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_recvmsg (fd, message, flags); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-send.c b/nptl/pt-send.c deleted file mode 100644 index 5af725e36f..0000000000 --- a/nptl/pt-send.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -ssize_t -__send (int fd, const __ptr_t buf, size_t n, int flags) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_send (fd, buf, n, flags); - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__send, send) diff --git a/nptl/pt-sendmsg.c b/nptl/pt-sendmsg.c deleted file mode 100644 index 8017f0d402..0000000000 --- a/nptl/pt-sendmsg.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -ssize_t -sendmsg (int fd, const struct msghdr *message, int flags) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_sendmsg (fd, message, flags); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-sendto.c b/nptl/pt-sendto.c deleted file mode 100644 index 1123bc41cb..0000000000 --- a/nptl/pt-sendto.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/socket.h> -#include "pthreadP.h" - - -ssize_t -sendto (int fd, const __ptr_t buf, size_t n, int flags, - __CONST_SOCKADDR_ARG addr, socklen_t addr_len) -{ - int oldtype = CANCEL_ASYNC (); - - ssize_t result = __libc_sendto (fd, buf, n, flags, addr, addr_len); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-sigtimedwait.c b/nptl/pt-sigtimedwait.c deleted file mode 100644 index f2a00d4c88..0000000000 --- a/nptl/pt-sigtimedwait.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <unistd.h> -#include <signal.h> -#include <sysdep.h> -#include "pthreadP.h" - - -int -sigtimedwait (const sigset_t *set, siginfo_t *info, - const struct timespec *timeout) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, info, timeout, - _NSIG / 8); -#else - int result = __sigtimedwait (set, info, timeout); -#endif - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-sigwait.c b/nptl/pt-sigwait.c deleted file mode 100644 index 88dca893b8..0000000000 --- a/nptl/pt-sigwait.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <unistd.h> -#include <signal.h> -#include <sysdep.h> -#include "pthreadP.h" - - -int -sigwait (const sigset_t *set, int *sig) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INTERNAL_SYSCALL - int result = INTERNAL_SYSCALL (rt_sigtimedwait, 4, set, NULL, NULL, - _NSIG / 8); - if (! INTERNAL_SYSCALL_ERROR_P (result)) - { - *sig = result; - result = 0; - } - else - result = INTERNAL_SYSCALL_ERRNO (result); -#elif defined INLINE_SYSCALL - int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, NULL, NULL, _NSIG / 8); - if (result != -1) - { - *sig = result; - result = 0; - } - else - result = errno; -#else - int result = __sigwait (set, sig); -#endif - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-tcdrain.c b/nptl/pt-tcdrain.c deleted file mode 100644 index ba1c4b77b4..0000000000 --- a/nptl/pt-tcdrain.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <termios.h> -#include "pthreadP.h" - - -int -tcdrain (int fd) -{ - int oldtype = CANCEL_ASYNC (); - - int result = __libc_tcdrain (fd); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-wait.c b/nptl/pt-wait.c deleted file mode 100644 index fa25f21343..0000000000 --- a/nptl/pt-wait.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/wait.h> -#include "pthreadP.h" - - -pid_t -__wait (__WAIT_STATUS_DEFN stat_loc) -{ - int oldtype = CANCEL_ASYNC (); - - pid_t result = __libc_wait (stat_loc); - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__wait, wait) diff --git a/nptl/pt-waitpid.c b/nptl/pt-waitpid.c deleted file mode 100644 index 86fa30c4b4..0000000000 --- a/nptl/pt-waitpid.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <sys/wait.h> -#include "pthreadP.h" - - -pid_t -waitpid (pid_t pid, int *stat_loc, int options) -{ - int oldtype = CANCEL_ASYNC (); - - pid_t result = __libc_waitpid (pid, stat_loc, options); - - CANCEL_RESET (oldtype); - - return result; -} diff --git a/nptl/pt-write.c b/nptl/pt-write.c deleted file mode 100644 index c8856e0835..0000000000 --- a/nptl/pt-write.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <errno.h> -#include <stdlib.h> -#include <sysdep.h> -#include <unistd.h> -#include "pthreadP.h" - - -ssize_t -__write (int fd, const void *buf, size_t count) -{ - int oldtype = CANCEL_ASYNC (); - -#ifdef INLINE_SYSCALL - ssize_t result = INLINE_SYSCALL (write, 3, fd, buf, count); -#else - ssize_t result = __libc_write (fd, buf, count); -#endif - - CANCEL_RESET (oldtype); - - return result; -} -strong_alias (__write, write) diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index e759e83062..c666387008 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -129,12 +129,20 @@ extern struct pthread_functions __libc_pthread_functions attribute_hidden; #define CANCEL_RESET(oldtype) \ __pthread_disable_asynccancel (oldtype) +#if !defined NOT_IN_libc /* Same as CANCEL_ASYNC, but for use in libc.so. */ -#define LIBC_CANCEL_ASYNC() \ +# define LIBC_CANCEL_ASYNC() \ __libc_enable_asynccancel () /* Same as CANCEL_RESET, but for use in libc.so. */ -#define LIBC_CANCEL_RESET(oldtype) \ +# define LIBC_CANCEL_RESET(oldtype) \ __libc_disable_asynccancel (oldtype) +#elif defined NOT_IN_libc && defined IS_IN_libpthread +# define LIBC_CANCEL_ASYNC() CANCEL_ASYNC () +# define LIBC_CANCEL_RESET(val) CANCEL_RESET (val) +#else +# define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */ +# define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */ +#endif /* This function is responsible for calling all registered cleanup |