From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] musl: add support for SIGEV_THREAD_ID timers (merge in weekend)
Date: Wed, 16 Nov 2022 03:17:36 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40550@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages musl-SIGEV_THREAD_ID
https://github.com/void-linux/void-packages/pull/40550
musl: add support for SIGEV_THREAD_ID timers (merge in weekend)
<!-- Uncomment relevant sections and delete options which are not applicable -->
Split from https://github.com/void-linux/void-packages/pull/34902
in order to avoid another bump to musl swallows the revision bump
[ci skip]
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/40550.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-musl-SIGEV_THREAD_ID-40550.patch --]
[-- Type: text/x-diff, Size: 11875 bytes --]
From 36f424e8f900ab7e15764df91439daadaf1e185b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 5 Nov 2022 11:33:12 -0700
Subject: [PATCH 01/10] musl: add support for SIGEV_THREAD_ID timers
https://git.musl-libc.org/cgit/musl/commit/?id=7c71792e87691451f2a6b76348e83ad1889f1dcb
---
...d-support-for-SIGEV_THREAD_ID-timers.patch | 74 +++++++++++++++++++
srcpkgs/musl/template | 2 +-
2 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/musl/patches/add-support-for-SIGEV_THREAD_ID-timers.patch
diff --git a/srcpkgs/musl/patches/add-support-for-SIGEV_THREAD_ID-timers.patch b/srcpkgs/musl/patches/add-support-for-SIGEV_THREAD_ID-timers.patch
new file mode 100644
index 000000000000..e20dff5ba0d4
--- /dev/null
+++ b/srcpkgs/musl/patches/add-support-for-SIGEV_THREAD_ID-timers.patch
@@ -0,0 +1,74 @@
+From 7c71792e87691451f2a6b76348e83ad1889f1dcb Mon Sep 17 00:00:00 2001
+From: James Y Knight <jyknight@google.com>
+Date: Sun, 30 Jun 2019 21:55:20 -0400
+Subject: [PATCH] add support for SIGEV_THREAD_ID timers
+
+This is like SIGEV_SIGNAL, but targeted to a particular thread's
+tid, rather than the process.
+---
+ include/signal.h | 16 +++++++++++++---
+ src/time/timer_create.c | 8 ++++++--
+ 2 files changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/include/signal.h b/include/signal.h
+index fbdf667b2..9ed929e4f 100644
+--- a/include/signal.h
++++ b/include/signal.h
+@@ -180,14 +180,24 @@ struct sigevent {
+ union sigval sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+- void (*sigev_notify_function)(union sigval);
+- pthread_attr_t *sigev_notify_attributes;
+- char __pad[56-3*sizeof(long)];
++ union {
++ char __pad[64 - 2*sizeof(int) - sizeof(union sigval)];
++ pid_t sigev_notify_thread_id;
++ struct {
++ void (*sigev_notify_function)(union sigval);
++ pthread_attr_t *sigev_notify_attributes;
++ } __sev_thread;
++ } __sev_fields;
+ };
+
++#define sigev_notify_thread_id __sev_fields.sigev_notify_thread_id
++#define sigev_notify_function __sev_fields.__sev_thread.sigev_notify_function
++#define sigev_notify_attributes __sev_fields.__sev_thread.sigev_notify_attributes
++
+ #define SIGEV_SIGNAL 0
+ #define SIGEV_NONE 1
+ #define SIGEV_THREAD 2
++#define SIGEV_THREAD_ID 4
+
+ int __libc_current_sigrtmin(void);
+ int __libc_current_sigrtmax(void);
+diff --git a/src/time/timer_create.c b/src/time/timer_create.c
+index 5ddfda278..4bef23905 100644
+--- a/src/time/timer_create.c
++++ b/src/time/timer_create.c
+@@ -71,11 +71,15 @@ int timer_create(clockid_t clk, struct sigevent *restrict evp, timer_t *restrict
+ switch (evp ? evp->sigev_notify : SIGEV_SIGNAL) {
+ case SIGEV_NONE:
+ case SIGEV_SIGNAL:
++ case SIGEV_THREAD_ID:
+ if (evp) {
+ ksev.sigev_value = evp->sigev_value;
+ ksev.sigev_signo = evp->sigev_signo;
+ ksev.sigev_notify = evp->sigev_notify;
+- ksev.sigev_tid = 0;
++ if (evp->sigev_notify == SIGEV_THREAD_ID)
++ ksev.sigev_tid = evp->sigev_notify_thread_id;
++ else
++ ksev.sigev_tid = 0;
+ ksevp = &ksev;
+ }
+ if (syscall(SYS_timer_create, clk, ksevp, &timerid) < 0)
+@@ -107,7 +111,7 @@ int timer_create(clockid_t clk, struct sigevent *restrict evp, timer_t *restrict
+
+ ksev.sigev_value.sival_ptr = 0;
+ ksev.sigev_signo = SIGTIMER;
+- ksev.sigev_notify = 4; /* SIGEV_THREAD_ID */
++ ksev.sigev_notify = SIGEV_THREAD_ID;
+ ksev.sigev_tid = td->tid;
+ if (syscall(SYS_timer_create, clk, &ksev, &timerid) < 0)
+ timerid = -1;
diff --git a/srcpkgs/musl/template b/srcpkgs/musl/template
index 34e6ed4fba6e..afb33cd868b5 100644
--- a/srcpkgs/musl/template
+++ b/srcpkgs/musl/template
@@ -2,7 +2,7 @@
pkgname=musl
reverts="1.2.0_1"
version=1.1.24
-revision=11
+revision=12
archs="*-musl"
bootstrap=yes
build_style=gnu-configure
From f5ae4ebef088e342a1a4ecc762bb9f38687156ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:01 +0700
Subject: [PATCH 02/10] cross-aarch64-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-aarch64-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index bb6a770afb79..6c73ec143867 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -6,7 +6,7 @@ _linux_version=5.10.4
_libucontext_version=1.0
pkgname=cross-aarch64-linux-musl
version=0.34
-revision=4
+revision=5
build_style=void-cross
configure_args="--with-arch=armv8-a"
hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
From c6f3c942ba08038be7a776fdfa97820921316e8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:01 +0700
Subject: [PATCH 03/10] cross-i686-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-i686-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 8be16a230d8d..39f87d76cc3f 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -6,7 +6,7 @@ _linux_version=5.10.4
_libucontext_version=1.0
pkgname=cross-i686-linux-musl
version=0.34
-revision=4
+revision=5
build_style=void-cross
hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
From 9634f99d674702f137664efc473846f0a4cf7e9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:02 +0700
Subject: [PATCH 04/10] cross-mips-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-mips-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 9b5d5819b1a0..ec10dc302f14 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -5,7 +5,7 @@ _musl_version=1.1.24
_linux_version=5.10.4
pkgname=cross-mips-linux-musl
version=0.34
-revision=3
+revision=4
build_style=void-cross
configure_args="--with-arch=mips32r2 --with-float=soft
--with-linker-hash-style=sysv"
From 074cb1b7dedee0b72f97b30d41ec0434dea31eea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:02 +0700
Subject: [PATCH 05/10] cross-mipsel-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-mipsel-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1acba7016dbc..f8e6823de0ec 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -5,7 +5,7 @@ _musl_version=1.1.24
_linux_version=5.10.4
pkgname=cross-mipsel-linux-musl
version=0.34
-revision=3
+revision=4
build_style=void-cross
configure_args="--with-arch=mips32r2 --with-float=soft
--with-linker-hash-style=sysv"
From 19027d17068555b270ab83ba1d296b86f2f9a66e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:02 +0700
Subject: [PATCH 06/10] cross-powerpc-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-powerpc-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index f9b22f0610d3..ce89f609f015 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -5,7 +5,7 @@ _musl_version=1.1.24
_linux_version=5.10.4
pkgname=cross-powerpc-linux-musl
version=0.34
-revision=3
+revision=4
build_style=void-cross
configure_args="--enable-secureplt --disable-vtable-verify
--disable-decimal-float"
From 4adcea3ad66c3c8d241acf8f8ea76031b09946cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:03 +0700
Subject: [PATCH 07/10] cross-powerpc64-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-powerpc64-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 016f18776a6d..f9a2885c93fd 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -6,7 +6,7 @@ _linux_version=5.10.4
_libucontext_version=1.0
pkgname=cross-powerpc64-linux-musl
version=0.34
-revision=4
+revision=5
build_style=void-cross
configure_args="--enable-secureplt --disable-vtable-verify
--disable-decimal-float --with-abi=elfv2 --enable-targets=powerpc-linux"
From d8ee86f1f78171a2970e6d565012f1c9639011de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:03 +0700
Subject: [PATCH 08/10] cross-powerpc64le-linux-musl: rebuild for
SIGEV_THREAD_ID support
---
srcpkgs/cross-powerpc64le-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index c17a3cccfe29..741e8f7f7843 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -6,7 +6,7 @@ _linux_version=5.10.4
_libucontext_version=1.0
pkgname=cross-powerpc64le-linux-musl
version=0.34
-revision=4
+revision=5
build_style=void-cross
configure_args="--enable-secureplt --disable-vtable-verify
--disable-decimal-float --with-abi=elfv2 --enable-targets=powerpcle-linux"
From e1e7554cf40ad6d495401ab43cfb872c402f8cb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:03 +0700
Subject: [PATCH 09/10] cross-powerpcle-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-powerpcle-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-powerpcle-linux-musl/template b/srcpkgs/cross-powerpcle-linux-musl/template
index 045cfda987fe..d782cfbbb5e4 100644
--- a/srcpkgs/cross-powerpcle-linux-musl/template
+++ b/srcpkgs/cross-powerpcle-linux-musl/template
@@ -5,7 +5,7 @@ _musl_version=1.1.24
_linux_version=5.10.4
pkgname=cross-powerpcle-linux-musl
version=0.34
-revision=3
+revision=4
build_style=void-cross
configure_args="--enable-secureplt --disable-vtable-verify
--disable-decimal-float"
From 571690bad8a44eda7b7c0a6f866f157378581dc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 16 Nov 2022 09:14:04 +0700
Subject: [PATCH 10/10] cross-x86_64-linux-musl: rebuild for SIGEV_THREAD_ID
support
---
srcpkgs/cross-x86_64-linux-musl/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index a941e7e02f6f..7f979afc68c1 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -6,7 +6,7 @@ _linux_version=5.10.4
_libucontext_version=1.0
pkgname=cross-x86_64-linux-musl
version=0.34
-revision=3
+revision=4
build_style=void-cross
hostmakedepends="texinfo tar gcc-objc gcc-go flex perl python3"
makedepends="isl15-devel libmpc-devel zlib-devel gmp-devel mpfr-devel"
next reply other threads:[~2022-11-16 2:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 2:17 sgn [this message]
2022-11-16 2:39 ` oreo639
2022-11-16 2:40 ` oreo639
2022-11-16 2:59 ` oreo639
2022-11-16 4:36 ` oreo639
2022-11-16 4:36 ` oreo639
2022-11-16 4:39 ` oreo639
2022-11-16 4:40 ` oreo639
2022-11-16 7:25 ` [PR PATCH] [Updated] " sgn
2022-11-26 9:53 ` sgn
2022-12-14 14:17 ` sgn
2022-12-17 6:00 ` [PR PATCH] [Closed]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40550@inbox.vuxu.org \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).