local-hurdsig-global-dispositions-version
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 16 Jul 2018 20:23:13 +0000 (21:23 +0100)
committerAurelien Jarno <aurel32@debian.org>
Mon, 16 Jul 2018 20:23:13 +0000 (21:23 +0100)
jkoenig's work on signals

2.13-19 dates when the global signal disposition call was added.
TODO: _DEBIAN_ in versions however pose problem. Remove the _DEBIAN_ version
once packages are rebuilt against 2.21.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name local-hurdsig-global-dispositions-version.diff

hurd/Versions
hurd/hurdsig.c
sysdeps/mach/hurd/i386/libc.abilist

index d3267014e6e3d7554a7b0412786eb3ef7b788759..ae441e7b819107e9b0696e8c017ad69ffb0b5c75 100644 (file)
@@ -137,6 +137,22 @@ libc {
     __hurd_threadvar_location;
     _hurd_userlink_link; _hurd_userlink_unlink; _hurd_userlink_clear;
   }
+  GLIBC_2.13_DEBIAN_19 {
+    # functions used by libpthread and <hurd/signal.h>
+    _hurd_sigstate_set_global_rcv;
+    _hurd_sigstate_lock;
+    _hurd_sigstate_pending;
+    _hurd_sigstate_unlock;
+    _hurd_sigstate_delete;
+  }
+  GLIBC_2.21 {
+    # functions used by libpthread and <hurd/signal.h>
+    _hurd_sigstate_set_global_rcv;
+    _hurd_sigstate_lock;
+    _hurd_sigstate_pending;
+    _hurd_sigstate_unlock;
+    _hurd_sigstate_delete;
+  }
 
   HURD_CTHREADS_0.3 {
     # weak refs to libthreads functions that libc calls iff libthreads in use
index 3fabe25e06f74008480f42081e29eac4a6c39689..91129bf1e90d43f4c8000cdd6bf1f884247a6f56 100644 (file)
@@ -32,6 +32,8 @@
 #include "hurdmalloc.h"                /* XXX */
 #include "../locale/localeinfo.h"
 
+#include <shlib-compat.h>
+
 const char *_hurdsig_getenv (const char *);
 
 struct mutex _hurd_siglock;
@@ -128,7 +130,7 @@ _hurd_thread_sigstate (thread_t thread)
  * corresponding thread is terminated (the kernel thread port must remain valid
  * until this function is called.) */
 void
-_hurd_sigstate_delete (thread_t thread)
+__hurd_sigstate_delete (thread_t thread)
 {
   struct hurd_sigstate **ssp, *ss;
 
@@ -145,14 +147,32 @@ _hurd_sigstate_delete (thread_t thread)
   if (ss)
     free (ss);
 }
+versioned_symbol (libc, __hurd_sigstate_delete, _hurd_sigstate_delete, GLIBC_2_21);
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+void
+__hurd_sigstate_delete_2_13 (thread_t thread)
+{
+  __hurd_sigstate_delete (thread);
+}
+compat_symbol (libc, __hurd_sigstate_delete_2_13, _hurd_sigstate_delete, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Make SS a global receiver, with pthread signal semantics.  */
 void
-_hurd_sigstate_set_global_rcv (struct hurd_sigstate *ss)
+__hurd_sigstate_set_global_rcv (struct hurd_sigstate *ss)
 {
   assert (ss->thread != MACH_PORT_NULL);
   ss->actions[0].sa_handler = SIG_IGN;
 }
+versioned_symbol (libc, __hurd_sigstate_set_global_rcv, _hurd_sigstate_set_global_rcv, GLIBC_2_21);
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+void
+__hurd_sigstate_set_global_rcv_2_13 (struct hurd_sigstate *ss)
+{
+  __hurd_sigstate_set_global_rcv (ss);
+}
+compat_symbol (libc, __hurd_sigstate_set_global_rcv_2_13, _hurd_sigstate_set_global_rcv, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Check whether SS is a global receiver.  */
 static int
@@ -164,30 +184,56 @@ sigstate_is_global_rcv (const struct hurd_sigstate *ss)
 /* Lock/unlock a hurd_sigstate structure.  If the accessors below require
    it, the global sigstate will be locked as well.  */
 void
-_hurd_sigstate_lock (struct hurd_sigstate *ss)
+__hurd_sigstate_lock (struct hurd_sigstate *ss)
 {
   if (sigstate_is_global_rcv (ss))
     __spin_lock (&_hurd_global_sigstate->lock);
   __spin_lock (&ss->lock);
 }
 void
-_hurd_sigstate_unlock (struct hurd_sigstate *ss)
+__hurd_sigstate_unlock (struct hurd_sigstate *ss)
 {
   __spin_unlock (&ss->lock);
   if (sigstate_is_global_rcv (ss))
     __spin_unlock (&_hurd_global_sigstate->lock);
 }
+versioned_symbol (libc, __hurd_sigstate_lock, _hurd_sigstate_lock, GLIBC_2_21);
+versioned_symbol (libc, __hurd_sigstate_unlock, _hurd_sigstate_unlock, GLIBC_2_21);
+
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+void
+__hurd_sigstate_lock_2_13 (struct hurd_sigstate *ss)
+{
+  __hurd_sigstate_lock (ss);
+}
+void
+__hurd_sigstate_unlock_2_13 (struct hurd_sigstate *ss)
+{
+  __hurd_sigstate_unlock (ss);
+}
+compat_symbol (libc, __hurd_sigstate_lock_2_13, _hurd_sigstate_lock, GLIBC_2_13_DEBIAN_19);
+compat_symbol (libc, __hurd_sigstate_unlock_2_13, _hurd_sigstate_unlock, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Retreive a thread's full set of pending signals, including the global
    ones if appropriate.  SS must be locked.  */
 sigset_t
-_hurd_sigstate_pending (const struct hurd_sigstate *ss)
+__hurd_sigstate_pending (const struct hurd_sigstate *ss)
 {
   sigset_t pending = ss->pending;
   if (sigstate_is_global_rcv (ss))
     __sigorset (&pending, &pending, &_hurd_global_sigstate->pending);
   return pending;
 }
+versioned_symbol (libc, __hurd_sigstate_pending, _hurd_sigstate_pending, GLIBC_2_21);
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+sigset_t
+__hurd_sigstate_pending_2_13 (const struct hurd_sigstate *ss)
+{
+  return __hurd_sigstate_pending (ss);
+}
+compat_symbol (libc, __hurd_sigstate_pending_2_13, _hurd_sigstate_pending, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Clear a pending signal and return the associated detailed
    signal information. SS must be locked, and must have signal SIGNO
index 991c41b37430fa4da4a6de8b44ec36962c1d53da..e8224f0bf8ac2343c58fcd49bdebbeb963ca436d 100644 (file)
@@ -32,6 +32,12 @@ GLIBC_2.11 mkstemps F
 GLIBC_2.11 mkstemps64 F
 GLIBC_2.13 GLIBC_2.13 A
 GLIBC_2.13 __fentry__ F
+GLIBC_2.13_DEBIAN_19 GLIBC_2.13_DEBIAN_19 A
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_delete F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_lock F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_pending F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_set_global_rcv F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_unlock F
 GLIBC_2.14 GLIBC_2.14 A
 GLIBC_2.14 syncfs F
 GLIBC_2.15 GLIBC_2.15 A
@@ -1951,6 +1957,11 @@ GLIBC_2.2.6 xprt_unregister F
 GLIBC_2.21 GLIBC_2.21 A
 GLIBC_2.21 __mach_host_self_ D 0x4
 GLIBC_2.21 __pthread_get_cleanup_stack F
+GLIBC_2.21 _hurd_sigstate_delete F
+GLIBC_2.21 _hurd_sigstate_lock F
+GLIBC_2.21 _hurd_sigstate_pending F
+GLIBC_2.21 _hurd_sigstate_set_global_rcv F
+GLIBC_2.21 _hurd_sigstate_unlock F
 GLIBC_2.21 pthread_attr_destroy F
 GLIBC_2.21 pthread_attr_getdetachstate F
 GLIBC_2.21 pthread_attr_getinheritsched F