This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch glibc-2.26
in repository glibc.

commit e3ec718c81b26db48ecbcc4dde4b9e4ff06ea353
Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
Date:   Mon Sep 25 07:40:49 2017 +0000

    hurd: Fix exposing lll_* symbols
    
        - patches/hurd-i386/tg-gsync-libc.diff: Update.
        - patches/hurd-i386/tg-libpthread-gsync-mutex.diff: Update.
---
 debian/changelog                                   |  2 +
 debian/patches/hurd-i386/tg-gsync-libc.diff        | 85 ++++++++--------------
 .../hurd-i386/tg-libpthread-gsync-mutex.diff       |  6 +-
 3 files changed, 35 insertions(+), 58 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4995eb4..f10492c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -84,6 +84,8 @@ glibc (2.26-0experimental0) UNRELEASED; urgency=medium
     - patches/hurd-i386/git-socket-limit.diff: New patch.
     - patches/hurd-i386/tg-thread-linkspace.diff: New patch.
     - patches/hurd-i386/git-clock_gettime_gettimeofday.diff: New patch.
+    - patches/hurd-i386/tg-gsync-libc.diff: Update.
+    - patches/hurd-i386/tg-libpthread-gsync-mutex.diff: Update.
     - testsuite-xfail-debian.mk: Update.
     - testsuite-xfail-debian.mk: Remove now-removed XPG3 entries.
 
diff --git a/debian/patches/hurd-i386/tg-gsync-libc.diff 
b/debian/patches/hurd-i386/tg-gsync-libc.diff
index 6b22a7f..2d73d5e 100644
--- a/debian/patches/hurd-i386/tg-gsync-libc.diff
+++ b/debian/patches/hurd-i386/tg-gsync-libc.diff
@@ -67,25 +67,24 @@ Index: glibc-2.26/hurd/Versions
 ===================================================================
 --- glibc-2.26.orig/hurd/Versions
 +++ glibc-2.26/hurd/Versions
-@@ -161,4 +161,13 @@ libc {
+@@ -161,4 +161,12 @@ libc {
      cthread_keycreate; cthread_getspecific; cthread_setspecific;
      __libc_getspecific;
    }
 +
 +  GLIBC_PRIVATE {
 +    # Used by other libs.
-+    lll_xwait; lll_timed_wait; lll_timed_xwait;
 +    __lll_abstimed_wait; __lll_abstimed_xwait;
-+    __lll_abstimed_lock; lll_robust_lock;
-+    __lll_robust_abstimed_lock; lll_robust_trylock;
-+    lll_set_wake; lll_robust_unlock; lll_requeue;
++    __lll_abstimed_lock; __lll_robust_lock;
++    __lll_robust_abstimed_lock; __lll_robust_trylock;
++    __lll_robust_unlock;
 +  }
  }
 Index: glibc-2.26/hurd/hurdlock.c
 ===================================================================
 --- /dev/null
 +++ glibc-2.26/hurd/hurdlock.c
-@@ -0,0 +1,247 @@
+@@ -0,0 +1,216 @@
 +/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -108,25 +107,6 @@ Index: glibc-2.26/hurd/hurdlock.c
 +#include <time.h>
 +#include <errno.h>
 +
-+int lll_xwait (void *ptr, int lo, int hi, int flags)
-+{
-+  return (__gsync_wait (__mach_task_self (),
-+    (vm_offset_t)ptr, lo, hi, 0, flags | GSYNC_QUAD));
-+}
-+
-+int lll_timed_wait (void *ptr, int val, int mlsec, int flags)
-+{
-+  return (__gsync_wait (__mach_task_self (),
-+    (vm_offset_t)ptr, val, 0, mlsec, flags | GSYNC_TIMED));
-+}
-+
-+int lll_timed_xwait (void *ptr, int lo,
-+  int hi, int mlsec, int flags)
-+{
-+  return (__gsync_wait (__mach_task_self (), (vm_offset_t)ptr,
-+    lo, hi, mlsec, flags | GSYNC_TIMED | GSYNC_QUAD));
-+}
-+
 +/* Convert an absolute timeout in nanoseconds to a relative
 + * timeout in milliseconds. */
 +static inline int __attribute__ ((gnu_inline))
@@ -184,18 +164,6 @@ Index: glibc-2.26/hurd/hurdlock.c
 +    }
 +}
 +
-+void lll_set_wake (void *ptr, int val, int flags)
-+{
-+  __gsync_wake (__mach_task_self (),
-+    (vm_offset_t)ptr, val, flags | GSYNC_MUTATE);
-+}
-+
-+void lll_requeue (void *src, void *dst, int wake_one, int flags)
-+{
-+  __gsync_requeue (__mach_task_self (), (vm_offset_t)src,
-+    (vm_offset_t)dst, (boolean_t)wake_one, flags);
-+}
-+
 +/* Robust locks. */
 +
 +extern int __getpid (void) __attribute__ ((const));
@@ -217,7 +185,7 @@ Index: glibc-2.26/hurd/hurdlock.c
 + * maximum blocking time is determined by this constant. */
 +#define MAX_WAIT_TIME   1500
 +
-+int lll_robust_lock (void *ptr, int flags)
++int __lll_robust_lock (void *ptr, int flags)
 +{
 +  int *iptr = (int *)ptr;
 +  int id = __getpid ();
@@ -300,7 +268,7 @@ Index: glibc-2.26/hurd/hurdlock.c
 +    }
 +}
 +
-+int lll_robust_trylock (void *ptr)
++int __lll_robust_trylock (void *ptr)
 +{
 +  int *iptr = (int *)ptr;
 +  int id = __getpid ();
@@ -318,7 +286,7 @@ Index: glibc-2.26/hurd/hurdlock.c
 +  return (EBUSY);
 +}
 +
-+void lll_robust_unlock (void *ptr, int flags)
++void __lll_robust_unlock (void *ptr, int flags)
 +{
 +  unsigned int val = atomic_load_relaxed((unsigned int *)ptr);
 +  while (1)
@@ -337,7 +305,7 @@ Index: glibc-2.26/hurd/hurdlock.h
 ===================================================================
 --- /dev/null
 +++ glibc-2.26/hurd/hurdlock.h
-@@ -0,0 +1,117 @@
+@@ -0,0 +1,124 @@
 +/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -370,16 +338,19 @@ Index: glibc-2.26/hurd/hurdlock.h
 +
 +/* Wait on 64-bit address PTR, without blocking if its contents
 + * are different from the pair <LO, HI>. */
-+extern int lll_xwait (void *__ptr, int __lo,
-+  int __hi, int __flags);
++#define lll_xwait(ptr, lo, hi, flags) \
++  __gsync_wait (__mach_task_self (), \
++    (vm_offset_t)ptr, lo, hi, 0, flags | GSYNC_QUAD)
 +
 +/* Same as 'lll_wait', but only block for MLSEC milliseconds. */
-+extern int lll_timed_wait (void *__ptr, int __val,
-+  int __mlsec, int __flags);
++#define lll_timed_wait(ptr, val, mlsec, flags) \
++  __gsync_wait (__mach_task_self (), \
++    (vm_offset_t)ptr, val, 0, mlsec, flags | GSYNC_TIMED)
 +
 +/* Same as 'lll_xwait', but only block for MLSEC milliseconds. */
-+extern int lll_timed_xwait (void *__ptr, int __lo,
-+  int __hi, int __mlsec, int __flags);
++#define lll_timed_xwait(ptr, lo, hi, mlsec, flags) \
++  __gsync_wait (__mach_task_self (), (vm_offset_t)ptr, \
++    lo, hi, mlsec, flags | GSYNC_TIMED | GSYNC_QUAD)
 +
 +/* Same as 'lll_wait', but only block until TSP elapses,
 + * using clock CLK. */
@@ -398,28 +369,31 @@ Index: glibc-2.26/hurd/hurdlock.h
 +
 +/* Acquire the lock at PTR, but return with an error if
 + * the process containing the owner thread dies. */
-+extern int lll_robust_lock (void *__ptr, int __flags);
++extern int __lll_robust_lock (void *__ptr, int __flags);
 +
-+/* Same as 'lll_robust_lock', but only block until TSP
++/* Same as '__lll_robust_lock', but only block until TSP
 + * elapses, using clock CLK. */
 +extern int __lll_robust_abstimed_lock (void *__ptr,
 +  const struct timespec *__tsp, int __flags, int __clk);
 +
-+/* Same as 'lll_robust_lock', but return with an error
++/* Same as '__lll_robust_lock', but return with an error
 + * if the lock cannot be acquired without blocking. */
-+extern int lll_robust_trylock (void *__ptr);
++extern int __lll_robust_trylock (void *__ptr);
 +
 +/* Wake one or more threads waiting on address PTR,
 + * setting its value to VAL before doing so. */
-+extern void lll_set_wake (void *__ptr, int __val, int __flags);
++#define lll_set_wake(ptr, val, flags) \
++  __gsync_wake (__mach_task_self (), \
++    (vm_offset_t)ptr, val, flags | GSYNC_MUTATE)
 +
 +/* Release the robust lock at PTR. */
-+extern void lll_robust_unlock (void *__ptr, int __flags);
++extern void __lll_robust_unlock (void *__ptr, int __flags);
 +
 +/* Rearrange threads waiting on address SRC to instead wait on
 + * DST, waking one of them if WAIT_ONE is non-zero. */
-+extern void lll_requeue (void *__src, void *__dst,
-+  int __wake_one, int __flags);
++#define lll_requeue(src, dst, wake_one, flags) \
++  __gsync_requeue (__mach_task_self (), (vm_offset_t)src, \
++    (vm_offset_t)dst, (boolean_t)wake_one, flags)
 +
 +/* The following are hacks that allow us to simulate optional
 + * parameters in C, to avoid having to pass the clock id for
@@ -454,6 +428,7 @@ Index: glibc-2.26/hurd/hurdlock.h
 +       __clk[sizeof (__clk) / sizeof (__clk[0]) - 1]);   \
 +   })
 +
++
 +#endif
 Index: glibc-2.26/hurd/hurdpid.c
 ===================================================================
diff --git a/debian/patches/hurd-i386/tg-libpthread-gsync-mutex.diff 
b/debian/patches/hurd-i386/tg-libpthread-gsync-mutex.diff
index 705d40d..5b2a56d 100644
--- a/debian/patches/hurd-i386/tg-libpthread-gsync-mutex.diff
+++ b/debian/patches/hurd-i386/tg-libpthread-gsync-mutex.diff
@@ -455,7 +455,7 @@ index 0000000..8104fa3
 +      case PT_MTX_RECURSIVE  | PTHREAD_MUTEX_ROBUST:
 +      case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
 +        self = _pthread_self ();
-+        ROBUST_LOCK (self, mtxp, lll_robust_lock, flags);
++        ROBUST_LOCK (self, mtxp, __lll_robust_lock, flags);
 +        break;
 +
 +      default:
@@ -512,7 +512,7 @@ index 0000000..8104fa3
 +      case PT_MTX_RECURSIVE  | PTHREAD_MUTEX_ROBUST:
 +      case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
 +        self = _pthread_self ();
-+        ROBUST_LOCK (self, mtxp, lll_robust_trylock);
++        ROBUST_LOCK (self, mtxp, __lll_robust_trylock);
 +        break;
 +
 +      default:
@@ -632,7 +632,7 @@ index 0000000..8104fa3
 +             * state, mark it as irrecoverable. */
 +            mtxp->__owner_id = (mtxp->__lock & LLL_DEAD_OWNER) ?
 +              NOTRECOVERABLE_ID : 0;
-+            lll_robust_unlock (&mtxp->__lock, flags);
++            __lll_robust_unlock (&mtxp->__lock, flags);
 +          }
 +
 +        break;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-glibc/glibc.git

Reply via email to