summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2023-04-24 10:25:05 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2023-04-24 10:25:05 +0000
commitcba49eb6a183b67c94237254bc82dd1df88f13f8 (patch)
tree62ac94e2b4e1d22c27b7398806cb4f1d34ae7073
parent8ee306372123f1d44b659b4859c47fde2caba64f (diff)
parent3aeef671d0f07856785efb8e3e5c559107be3ee0 (diff)
downloadglib-cba49eb6a183b67c94237254bc82dd1df88f13f8.tar.gz
Merge branch 'mutex-tests-more' into 'main'
glib/tests/[rec-]mutex: Allow each thread to work See merge request GNOME/glib!3389
-rw-r--r--glib/tests/mutex.c2
-rw-r--r--glib/tests/rec-mutex.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/glib/tests/mutex.c b/glib/tests/mutex.c
index 7aeb4a561..2d0ef1ff3 100644
--- a/glib/tests/mutex.c
+++ b/glib/tests/mutex.c
@@ -195,7 +195,7 @@ test_mutex_perf (gconstpointer data)
gint x = -1;
guint i;
- count_to = g_test_perf () ? 100000000 : 1;
+ count_to = g_test_perf () ? 100000000 : n_threads + 1;
g_assert (n_threads <= G_N_ELEMENTS (threads));
diff --git a/glib/tests/rec-mutex.c b/glib/tests/rec-mutex.c
index d7cd62431..ad38a69a8 100644
--- a/glib/tests/rec-mutex.c
+++ b/glib/tests/rec-mutex.c
@@ -204,7 +204,7 @@ test_mutex_perf (gconstpointer data)
n_threads = c / 256;
depth = c % 256;
- count_to = g_test_perf () ? 100000000 : 1;
+ count_to = g_test_perf () ? 100000000 : n_threads + 1;
for (i = 0; i < n_threads - 1; i++)
threads[i] = g_thread_new ("test", addition_thread, &x);