Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Interpose cancellation points in pollts() and pselect(), bri...



details:   https://anonhg.NetBSD.org/src/rev/497e55172228
branches:  trunk
changeset: 579578:497e55172228
user:      kleink <kleink%NetBSD.org@localhost>
date:      Fri Mar 18 11:23:44 2005 +0000

description:
Interpose cancellation points in pollts() and pselect(), bringing us
to libc.so.12.127 and libpthread.so.0.6.

diffstat:

 distrib/sets/lists/base/shl.mi      |   8 +++---
 lib/libc/shlib_version              |   4 +-
 lib/libc/sys/Makefile.inc           |   7 ++---
 lib/libpthread/pthread_cancelstub.c |  46 +++++++++++++++++++++++++++++++++---
 lib/libpthread/shlib_version        |   4 +-
 5 files changed, 53 insertions(+), 16 deletions(-)

diffs (179 lines):

diff -r 12107d2912a6 -r 497e55172228 distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi    Fri Mar 18 11:22:23 2005 +0000
+++ b/distrib/sets/lists/base/shl.mi    Fri Mar 18 11:23:44 2005 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: shl.mi,v 1.304 2005/03/15 15:02:51 christos Exp $
+# $NetBSD: shl.mi,v 1.305 2005/03/18 11:23:44 kleink Exp $
 # Note: libtermcap and libtermlib are hardlinked and share the same version.
-./lib/libc.so.12.126                           base-sys-shlib
+./lib/libc.so.12.127                           base-sys-shlib
 ./lib/libcrypt.so.0.2                          base-sys-shlib
 ./lib/libcrypto.so.2.1                         base-crypto-shlib       crypto
 ./lib/libedit.so.2.9                           base-sys-shlib
@@ -34,7 +34,7 @@
 ./usr/lib/libasn1.so.6.1                       base-krb5-shlib         kerberos
 ./usr/lib/libbsdmalloc.so.0.0                  base-sys-shlib
 ./usr/lib/libbz2.so.1.0                                base-sys-shlib
-./usr/lib/libc.so.12.126                       base-sys-shlib
+./usr/lib/libc.so.12.127                       base-sys-shlib
 ./usr/lib/libcdk.so.1.0                                base-sys-shlib
 ./usr/lib/libcom_err.so.4.1                    base-krb5-shlib         kerberos
 ./usr/lib/libcrypt.so.0.2                      base-sys-shlib
@@ -66,7 +66,7 @@
 ./usr/lib/libpcap.so.1.4                       base-net-shlib
 ./usr/lib/libpci.so.1.0                                base-sys-shlib
 ./usr/lib/libposix.so.0.1                      base-sys-shlib
-./usr/lib/libpthread.so.0.5                    base-sys-shlib
+./usr/lib/libpthread.so.0.6                    base-sys-shlib
 ./usr/lib/libpthread_dbg.so.0.0                        base-sys-shlib
 ./usr/lib/libresolv.so.1.1                     base-net-shlib
 ./usr/lib/libradius.so.0.0                     base-net-shlib
diff -r 12107d2912a6 -r 497e55172228 lib/libc/shlib_version
--- a/lib/libc/shlib_version    Fri Mar 18 11:22:23 2005 +0000
+++ b/lib/libc/shlib_version    Fri Mar 18 11:23:44 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: shlib_version,v 1.161 2005/03/13 15:16:47 perry Exp $
+#      $NetBSD: shlib_version,v 1.162 2005/03/18 11:23:44 kleink Exp $
 #      Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -17,4 +17,4 @@
 # - libc/net/getnet{ent,namadr}.c, netdb.h: remove __n_pad0
 #
 major=12
-minor=126
+minor=127
diff -r 12107d2912a6 -r 497e55172228 lib/libc/sys/Makefile.inc
--- a/lib/libc/sys/Makefile.inc Fri Mar 18 11:22:23 2005 +0000
+++ b/lib/libc/sys/Makefile.inc Fri Mar 18 11:23:44 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.156 2005/02/26 18:04:19 matt Exp $
+#      $NetBSD: Makefile.inc,v 1.157 2005/03/18 11:23:44 kleink Exp $
 #      @(#)Makefile.inc        8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -73,9 +73,8 @@
                mlock.S mlockall.S mount.S mprotect.S __msgctl13.S msgget.S \
                munlock.S munlockall.S munmap.S \
        nfssvc.S ntp_gettime.S \
-       pathconf.S pmc_get_info.S pmc_control.S pollts.S __posix_chown.S \
+       pathconf.S pmc_get_info.S pmc_control.S __posix_chown.S \
                __posix_fchown.S __posix_lchown.S __posix_rename.S profil.S \
-               pselect.S \
        quotactl.S \
        rasctl.S readlink.S reboot.S recvfrom.S recvmsg.S rename.S revoke.S \
                rmdir.S \
@@ -96,7 +95,7 @@
 WEAKASM= accept.S close.S connect.S execve.S \
        fcntl.S fdatasync.S fsync.S fsync_range.S \
        kill.S msgrcv.S msgsnd.S __msync13.S \
-       nanosleep.S open.S poll.S read.S readv.S \
+       nanosleep.S open.S poll.S pollts.S pselect.S read.S readv.S \
        select.S __sigprocmask14.S __sigsuspend14.S sysarch.S \
        wait4.S write.S writev.S
 
diff -r 12107d2912a6 -r 497e55172228 lib/libpthread/pthread_cancelstub.c
--- a/lib/libpthread/pthread_cancelstub.c       Fri Mar 18 11:22:23 2005 +0000
+++ b/lib/libpthread/pthread_cancelstub.c       Fri Mar 18 11:23:44 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_cancelstub.c,v 1.10 2005/03/10 00:34:23 kleink Exp $   */
+/*     $NetBSD: pthread_cancelstub.c,v 1.11 2005/03/18 11:23:44 kleink Exp $   */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,13 +37,14 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_cancelstub.c,v 1.10 2005/03/10 00:34:23 kleink Exp $");
+__RCSID("$NetBSD: pthread_cancelstub.c,v 1.11 2005/03/18 11:23:44 kleink Exp $");
 
 /*
- * This is necessary because the fsync_range() name is always weak (it is
- * not a POSIX function).
+ * This is necessary because the names are always weak (they are not
+ * POSIX functions).
  */
 #define        fsync_range     _fsync_range
+#define        pollts          _pollts
 
 /*
  * XXX this is necessary to get the prototypes for the __sigsuspend14
@@ -83,7 +84,11 @@
 int    _sys___msync13(void *, size_t, int);
 int    _sys_open(const char *, int, ...);
 int    _sys_poll(struct pollfd *, nfds_t, int);
+int    _sys_pollts(struct pollfd *, nfds_t, const struct timespec *,
+           const sigset_t *);
 ssize_t        _sys_pread(int, void *, size_t, off_t);
+int    _sys_pselect(int, fd_set *, fd_set *, fd_set *,
+           const struct timespec *, const sigset_t *);
 ssize_t        _sys_pwrite(int, const void *, size_t, off_t);
 ssize_t        _sys_read(int, void *, size_t);
 ssize_t        _sys_readv(int, const struct iovec *, int);
@@ -272,6 +277,21 @@
        return retval;
 }
 
+int
+pollts(struct pollfd *fds, nfds_t nfds, const struct timespec *ts,
+    const sigset_t *sigmask)
+{
+       int retval;
+       pthread_t self;
+
+       self = pthread__self();
+       TESTCANCEL(self);
+       retval = _sys_pollts(fds, nfds, ts, sigmask);
+       TESTCANCEL(self);
+
+       return retval;
+}
+
 ssize_t
 pread(int d, void *buf, size_t nbytes, off_t offset)
 {
@@ -286,6 +306,22 @@
        return retval;
 }
 
+int
+pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, 
+    const struct timespec *timeout, const sigset_t *sigmask)
+{
+       int retval;
+       pthread_t self;
+
+       self = pthread__self();
+       TESTCANCEL(self);
+       retval = _sys_pselect(nfds, readfds, writefds, exceptfds, timeout,
+           sigmask);
+       TESTCANCEL(self);
+
+       return retval;
+}
+
 ssize_t
 pwrite(int d, const void *buf, size_t nbytes, off_t offset)
 {
@@ -396,7 +432,9 @@
 __strong_alias(___msync13, __msync13)
 __strong_alias(_open, open)
 __strong_alias(_poll, poll)
+__weak_alias(pollts, _pollts)
 __strong_alias(_pread, pread)
+__strong_alias(_pselect, pselect)
 __strong_alias(_pwrite, pwrite)
 __strong_alias(_read, read)
 __strong_alias(_readv, readv)
diff -r 12107d2912a6 -r 497e55172228 lib/libpthread/shlib_version
--- a/lib/libpthread/shlib_version      Fri Mar 18 11:22:23 2005 +0000
+++ b/lib/libpthread/shlib_version      Fri Mar 18 11:23:44 2005 +0000
@@ -1,5 +1,5 @@
-#      $NetBSD: shlib_version,v 1.7 2004/05/21 04:09:13 christos Exp $
+#      $NetBSD: shlib_version,v 1.8 2005/03/18 11:23:44 kleink Exp $
 #      Remember to update distrib/sets/lists/base/shl.* when changing
 #
 major=0
-minor=5
+minor=6



Home | Main Index | Thread Index | Old Index