local-hurdsig-globaldisp-version
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 20 Sep 2019 19:39:03 +0000 (20:39 +0100)
committerAurelien Jarno <aurel32@debian.org>
Fri, 20 Sep 2019 19:39:03 +0000 (20:39 +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-globaldisp-version.diff

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

index b6508e03c617d13d9f12a37f5d25f2b0d2d9198d..b346f9a48cde881442aa31cc904b2da90ef7b1bd 100644 (file)
@@ -140,6 +140,22 @@ libc {
     # "quasi-internal" functions
     _hurd_port_move;
   }
+  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 4136d2ce27810263aec148c8db86d5f21845d0c6..024779f8c619937a485865f46fb61f797e4c3a60 100644 (file)
@@ -35,6 +35,8 @@
 
 #include <libc-diag.h>
 
+#include <shlib-compat.h>
+
 const char *_hurdsig_getenv (const char *);
 
 struct mutex _hurd_siglock;
@@ -133,7 +135,7 @@ libc_hidden_def (_hurd_thread_sigstate)
  * 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;
 
@@ -150,14 +152,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
@@ -169,30 +189,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 dd3cf6f9f266544e0c9d2ea7c25ed84250f5a5e7..0ac6db25652798e725e9c7275eb45774168aa676 100644 (file)
@@ -29,6 +29,11 @@ GLIBC_2.11 mkostemps64 F
 GLIBC_2.11 mkstemps F
 GLIBC_2.11 mkstemps64 F
 GLIBC_2.13 __fentry__ F
+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 syncfs F
 GLIBC_2.15 __fdelt_chk F
 GLIBC_2.15 __fdelt_warn F
@@ -1942,6 +1947,11 @@ GLIBC_2.2.6 xprt_register F
 GLIBC_2.2.6 xprt_unregister F
 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