r5754 - in glibc-package/branches/eglibc-2.18/debian: . patches/kfreebsd testsuite-checking
Author: ps-guest
Date: 2013-11-08 20:14:23 +0000 (Fri, 08 Nov 2013)
New Revision: 5754
Modified:
glibc-package/branches/eglibc-2.18/debian/changelog
glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-fbtl.diff
glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-sysdeps.diff
glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i486-kfreebsd-gnu-libc
glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i386
glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i686
glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc
Log:
kfreebsd - sync with 2.18; use wait6 for waitid
Modified: glibc-package/branches/eglibc-2.18/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/changelog 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/changelog 2013-11-08 20:14:23 UTC (rev 5754)
@@ -62,11 +62,11 @@
expected-results-i686-gnu-xen: Update testsuite result.
[ Petr Salinger ]
- * kfreebsd/local-sysdeps.diff: update to revision 5129 (from glibc-bsd).
+ * kfreebsd/local-sysdeps.diff: update to revision 5135 (from glibc-bsd).
* kfreebsd/local-fbtl.diff: likewise
* update symbols file for kfreebsd
* update testsuite-checking/expected-results-*-kfreebsd-gnu-*
- * add kfreebsd/submitted-waitid.diff
+ * add kfreebsd/submitted-waitid.diff. Closes: #720188.
* add kfreebsd/submitted-auxv.diff. Closes: #717912.
* drop obsolete patches/*/local-linuxthreads*
* drop obsolete linuxthreads part of kfreebsd/local-scripts.diff
Modified: glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-fbtl.diff
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-fbtl.diff 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-fbtl.diff 2013-11-08 20:14:23 UTC (rev 5754)
@@ -99,7 +99,16 @@
+Native POSIX Threads Library by Ulrich Drepper et al
--- /dev/null
+++ b/fbtl/ChangeLog
-@@ -0,0 +1,12894 @@
+@@ -0,0 +1,12903 @@
++2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
++
++ [BZ #12310]
++ * pthread_exit.c: Add reference to pthread_create.
++
++2013-06-22 Joseph Myers <joseph@codesourcery.com>
++
++ * pthread_getattr_default_np.c: Include <string.h>.
++
+2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * Versions (libpthread): Add GLIBC_2.18.
@@ -13595,6 +13604,7 @@
+ pthread_attr_getaffinity pthread_attr_setaffinity \
+ cleanup_routine unwind-forcedunwind \
+ pthread_setname pthread_getname \
++ pthread_setattr_default_np pthread_getattr_default_np
+
+# lowlevelrobustlock
+# pthread_sigqueue
@@ -13609,7 +13619,6 @@
+# pthread_mutexattr_setprioceiling tpp \
+# pthread_mutex_getprioceiling \
+# pthread_mutex_setprioceiling \
-+# pthread_setattr_default_np pthread_getattr_default_np
+
+# commented out also in nptl
+
@@ -14829,7 +14838,7 @@
+ what to test?
--- /dev/null
+++ b/fbtl/Versions
-@@ -0,0 +1,245 @@
+@@ -0,0 +1,250 @@
+libc {
+ GLIBC_2.0 {
+ pthread_attr_destroy; pthread_attr_init;
@@ -15069,6 +15078,11 @@
+ pthread_setname_np; pthread_getname_np;
+ };
+
++ GLIBC_2.18 {
++ pthread_getattr_default_np;
++ pthread_setattr_default_np;
++ }
++
+ GLIBC_PRIVATE {
+ __pthread_initialize_minimal;
+ __pthread_clock_gettime; __pthread_clock_settime;
@@ -23190,7 +23204,7 @@
+}
--- /dev/null
+++ b/fbtl/pthread_create.c
-@@ -0,0 +1,672 @@
+@@ -0,0 +1,664 @@
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -23503,14 +23517,11 @@
+#endif
+ }
+
-+#warning call_tls_dtors will be available with 2.18 upload
-+#if 0
+ /* Call destructors for the thread_local TLS variables. */
+#ifndef SHARED
+ if (&__call_tls_dtors != NULL)
+#endif
+ __call_tls_dtors ();
-+#endif
+
+ /* Run the destructor for the thread-local data. */
+ __nptl_deallocate_tsd ();
@@ -23656,12 +23667,7 @@
+ if (cpusetsize > 0)
+ {
+ cpu_set_t *cpuset;
-+#if 0
+ if (__glibc_likely (__libc_use_alloca (cpusetsize)))
-+#else
-+#warning wait for 2.18
-+ if ((__libc_use_alloca (cpusetsize)))
-+#endif
+ cpuset = __alloca (cpusetsize);
+ else
+ {
@@ -23956,7 +23962,7 @@
+strong_alias (__pthread_equal, pthread_equal)
--- /dev/null
+++ b/fbtl/pthread_exit.c
-@@ -0,0 +1,31 @@
+@@ -0,0 +1,35 @@
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -23988,6 +23994,10 @@
+ __do_cancel ();
+}
+strong_alias (__pthread_exit, pthread_exit)
++
++/* After a thread terminates, __libc_start_main decrements
++ __nptl_nthreads defined in pthread_create.c. */
++PTHREAD_STATIC_FN_REQUIRE (pthread_create)
--- /dev/null
+++ b/fbtl/pthread_getattr_default_np.c
@@ -0,0 +1,37 @@
@@ -28412,7 +28422,7 @@
+strong_alias (__pthread_self, pthread_self)
--- /dev/null
+++ b/fbtl/pthread_setattr_default_np.c
-@@ -0,0 +1,110 @@
+@@ -0,0 +1,116 @@
+/* Set the default attributes to be used by pthread_create in the process.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -28435,6 +28445,7 @@
+#include <stdlib.h>
+#include <pthreadP.h>
+#include <assert.h>
++#include <string.h>
+
+int
+pthread_setattr_default_np (const pthread_attr_t *in)
@@ -28446,6 +28457,10 @@
+ assert (sizeof (*in) >= sizeof (struct pthread_attr));
+ real_in = (struct pthread_attr *) in;
+
++#if 1
++#warning scheduling attributes not yet supported
++#else
++
+ /* Catch invalid values. */
+ int policy = real_in->schedpolicy;
+ ret = check_sched_policy_attr (policy);
@@ -28463,6 +28478,7 @@
+ ret = check_cpuset_attr (real_in->cpuset, real_in->cpusetsize);
+ if (ret)
+ return ret;
++#endif
+
+ /* stacksize == 0 is fine. It means that we don't change the current
+ value. */
@@ -29708,7 +29724,7 @@
+#endif
--- /dev/null
+++ b/fbtl/sem_open.c
-@@ -0,0 +1,465 @@
+@@ -0,0 +1,461 @@
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -30093,10 +30109,6 @@
+ since the file must be opened with a specific mode. The
+ mode cannot later be set since then we cannot apply the
+ file create mask. */
-+#if 1
-+#warning drop it after 2.18 sync
-+#define __mktemp mktemp
-+#endif
+ if (__mktemp (tmpfname) == NULL)
+ return SEM_FAILED;
+
Modified: glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-sysdeps.diff 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/patches/kfreebsd/local-sysdeps.diff 2013-11-08 20:14:23 UTC (rev 5754)
@@ -4991,7 +4991,7 @@
+#endif
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/waitstatus.h
-@@ -0,0 +1,105 @@
+@@ -0,0 +1,102 @@
+/* Definitions of status bits for `wait' et al.
+ Copyright (C) 1992,1994,1996,1997,2000,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -5028,29 +5028,26 @@
+/* Nonzero if STATUS indicates normal termination. */
+#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
+
-+/* Nonzero if STATUS indicates termination by a signal. */
-+#define __WIFSIGNALED(status) \
-+ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
-+
+/* Nonzero if STATUS indicates the child is stopped. */
+#define __WIFSTOPPED(status) (((status) & 0x7f) == 0x7f)
+
-+/* Nonzero if STATUS indicates the child continued after a stop. We only
-+ define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */
-+#ifdef WCONTINUED
-+# define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
-+#endif
++/* Linux uses 0xffff, BSD uses SIGCONT */
++#define __W_CONTINUED 0x13
++#define __WCOREFLAG 0x80
++/* Nonzero if STATUS indicates the child continued after a stop. */
++#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
+
+/* Nonzero if STATUS indicates the child dumped core. */
+#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
+
++/* Nonzero if STATUS indicates termination by a signal. */
++#define __WIFSIGNALED(status) \
++ (!__WIFSTOPPED(status) && !__WIFEXITED(status) && !__WIFCONTINUED(status))
++
+/* Macros for constructing status values. */
+#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
+#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+
-+/* Linux uses 0xffff, BSD uses SIGCONT */
-+#define __W_CONTINUED 0x13
-+#define __WCOREFLAG 0x80
+
+
+#ifdef __USE_BSD
@@ -18434,7 +18431,7 @@
+#endif /* !_KENV_H */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/kernel-features.h
-@@ -0,0 +1,88 @@
+@@ -0,0 +1,93 @@
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+ Copyright (C) 2002 Free Software Foundation, Inc.
@@ -18521,6 +18518,11 @@
+# define __ASSUME_FALLOCATE 1
+#endif
+
++/* The wait6 syscall was introduced in kFreeBSD 9.2. */
++#if __KFREEBSD_KERNEL_VERSION >= 0x90200
++# define __ASSUME_WAIT6 1
++#endif
++
+/* Support for private "futexes" was added before we start with fbtl. */
+# define __ASSUME_PRIVATE_FUTEX 1
--- /dev/null
@@ -27842,7 +27844,7 @@
+#endif
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls.list
-@@ -0,0 +1,212 @@
+@@ -0,0 +1,213 @@
+# File name Caller Syscall name # args Strong name Weak names
+sys_access - access i:si __syscall_access
+acl_aclcheck_fd - acl_aclcheck_fd i:iip __acl_aclcheck_fd
@@ -28052,6 +28054,7 @@
+unmount - unmount i:si unmount
+utrace - utrace i:bn utrace
+wait4 - wait4 i:iWiP __syscall_wait4 __wait4 wait4
++sys_wait6 EXTRA wait6 i:iiWiPP __syscall_wait6
+sys_write - write i:ibn __syscall_write
+sys_writev - writev i:ipi __syscall_writev
+yield - yield i: __syscall_yield
@@ -29461,7 +29464,7 @@
+#include <sysdeps/unix/sysv/linux/wait3.c>
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/waitid.c
-@@ -0,0 +1,64 @@
+@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -29486,9 +29489,52 @@
+#include <sys/wait.h>
+#include <sysdep.h>
+
-+/* for now only the wrapper implementation */
-+/* later on we will try to use wait6 when available */
++extern int __syscall_wait6 (idtype_t itype, int64_t id,
++ int *status, int options,
++ struct rusage *rusage, siginfo_t *infop);
++libc_hidden_proto (__syscall_wait6)
+
++
++#define DO_WAITID simulated_waitid
++static int simulated_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options);
++
++
++#if !defined __ASSUME_WAIT6
++static int __have_wait6;
++#endif
++
++static inline int
++do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
++{
++ int ret;
++ int status;
++#ifndef __ASSUME_WAIT6
++ if (__have_wait6 >= 0)
++#endif
++ {
++ ret = INLINE_SYSCALL (wait6, 6, idtype, id, &status, options, NULL, infop);
++
++ if (ret == 0 && infop != NULL)
++ {
++ memset(infop, 0, sizeof(*infop));
++ }
++ if (ret >= 0)
++ return 0;
++#ifndef __ASSUME_WAIT6
++ if (errno == ENOSYS)
++ {
++ __have_wait6 = -1;
++ }
++ else
++#endif
++ {
++ return ret;
++ }
++ }
++ return simulated_waitid(idtype, id, infop, options);
++}
++
++
+#define waitid __unused_waitid_alias
+#include <sysdeps/posix/waitid.c>
+#undef waitid
Modified: glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i486-kfreebsd-gnu-libc
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i486-kfreebsd-gnu-libc 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i486-kfreebsd-gnu-libc 2013-11-08 20:14:23 UTC (rev 5754)
@@ -38,7 +38,7 @@
tst-cond-except, Error 1
tst-cond24, Error 1
tst-cond25, Error 1
-tst-default-attr, Error 1
+tst-default-attr.out, Error 22
tst-getpid1.o, Error 1
tst-getpid2.o, Error 1
tst-mutexpi1, Error 1
Modified: glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i386
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i386 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i386 2013-11-08 20:14:23 UTC (rev 5754)
@@ -40,7 +40,7 @@
tst-cond-except, Error 1
tst-cond24, Error 1
tst-cond25, Error 1
-tst-default-attr, Error 1
+tst-default-attr.out, Error 22
tst-getpid1.o, Error 1
tst-getpid2.o, Error 1
tst-mutexpi1, Error 1
Modified: glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i686
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i686 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i686 2013-11-08 20:14:23 UTC (rev 5754)
@@ -38,7 +38,7 @@
tst-cond-except, Error 1
tst-cond24, Error 1
tst-cond25, Error 1
-tst-default-attr, Error 1
+tst-default-attr.out, Error 22
tst-getpid1.o, Error 1
tst-getpid2.o, Error 1
tst-mutexpi1, Error 1
Modified: glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc 2013-11-07 21:03:59 UTC (rev 5753)
+++ glibc-package/branches/eglibc-2.18/debian/testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc 2013-11-08 20:14:23 UTC (rev 5754)
@@ -39,7 +39,7 @@
tst-cond-except, Error 1
tst-cond24, Error 1
tst-cond25, Error 1
-tst-default-attr, Error 1
+tst-default-attr.out, Error 22
tst-getpid1.o, Error 1
tst-getpid2.o, Error 1
tst-mutexpi1, Error 1
Reply to: