1 |
commit: 47faa4b07f8192795c1664bda54a88e1c6c4fcd9 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 1 20:57:12 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 20:58:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47faa4b0 |
7 |
|
8 |
dev-libs/concurrencykit: fix ck_hp_fifo test on high cpu count |
9 |
|
10 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
.../concurrencykit/concurrencykit-0.7.0-r1.ebuild | 1 + |
14 |
.../files/concurrencykit-0.7.0-tests.patch | 33 ++++++++++++++++++++++ |
15 |
2 files changed, 34 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/concurrencykit/concurrencykit-0.7.0-r1.ebuild b/dev-libs/concurrencykit/concurrencykit-0.7.0-r1.ebuild |
18 |
index 52fdc2f3633..e3b8d418245 100644 |
19 |
--- a/dev-libs/concurrencykit/concurrencykit-0.7.0-r1.ebuild |
20 |
+++ b/dev-libs/concurrencykit/concurrencykit-0.7.0-r1.ebuild |
21 |
@@ -26,6 +26,7 @@ PATCHES=( |
22 |
"${FILESDIR}/${P}-glibc-2.30.patch" |
23 |
"${FILESDIR}/${P}-gzip.patch" |
24 |
"${FILESDIR}/${P}-static-libs.patch" |
25 |
+ "${FILESDIR}/${P}-tests.patch" |
26 |
) |
27 |
|
28 |
src_configure() { |
29 |
|
30 |
diff --git a/dev-libs/concurrencykit/files/concurrencykit-0.7.0-tests.patch b/dev-libs/concurrencykit/files/concurrencykit-0.7.0-tests.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..4d29c6bcf7e |
33 |
--- /dev/null |
34 |
+++ b/dev-libs/concurrencykit/files/concurrencykit-0.7.0-tests.patch |
35 |
@@ -0,0 +1,33 @@ |
36 |
+From 07835a3d08d96db30393c235f95649e792883d50 Mon Sep 17 00:00:00 2001 |
37 |
+From: Samy Al Bahra <sbahra@×××××××××.io> |
38 |
+Date: Mon, 30 Nov 2020 18:33:51 -0500 |
39 |
+Subject: [PATCH] regressions/ck_hp_fifo: fixes false-positive from #165. |
40 |
+ |
41 |
+Add busy-wait barrier before next stage of test. Otherwise, |
42 |
+some threads may enter it and a non-empty queue state is observed. |
43 |
+--- |
44 |
+ regressions/ck_hp/validate/ck_hp_fifo.c | 4 ++++ |
45 |
+ 1 file changed, 4 insertions(+) |
46 |
+ |
47 |
+diff --git a/regressions/ck_hp/validate/ck_hp_fifo.c b/regressions/ck_hp/validate/ck_hp_fifo.c |
48 |
+index 4454283c..5820f1aa 100644 |
49 |
+--- a/regressions/ck_hp/validate/ck_hp_fifo.c |
50 |
++++ b/regressions/ck_hp/validate/ck_hp_fifo.c |
51 |
+@@ -55,6 +55,7 @@ static struct affinity a; |
52 |
+ static int size; |
53 |
+ static unsigned int barrier; |
54 |
+ static unsigned int e_barrier; |
55 |
++static unsigned int s_barrier; |
56 |
+ |
57 |
+ static void * |
58 |
+ test(void *c) |
59 |
+@@ -98,6 +99,9 @@ test(void *c) |
60 |
+ } |
61 |
+ } |
62 |
+ |
63 |
++ ck_pr_inc_uint(&s_barrier); |
64 |
++ while (ck_pr_load_uint(&s_barrier) < (unsigned int)nthr); |
65 |
++ |
66 |
+ for (i = 0; i < ITERATIONS; i++) { |
67 |
+ for (j = 0; j < size; j++) { |
68 |
+ fifo_entry = malloc(sizeof(ck_hp_fifo_entry_t)); |