* [hurd,commited 2/2] pthread: Move some attr tests from nptl to sysdeps/pthread
2020-02-09 17:32 [hurd,commited 1/2] htl: Fix default guard size Samuel Thibault
@ 2020-02-09 17:32 ` Samuel Thibault
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2020-02-09 17:32 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
So they can be checked with htl too.
---
nptl/Makefile | 2 +-
sysdeps/pthread/Makefile | 1 +
{nptl => sysdeps/pthread}/tst-attr1.c | 0
3 files changed, 2 insertions(+), 1 deletion(-)
rename {nptl => sysdeps/pthread}/tst-attr1.c (100%)
diff --git a/nptl/Makefile b/nptl/Makefile
index 774cf0a754..51a0be008b 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -234,7 +234,7 @@ LDLIBS-tst-thread-exit-clobber = -lstdc++
CFLAGS-tst-minstack-throw.o = -std=gnu++11
LDLIBS-tst-minstack-throw = -lstdc++
-tests = tst-attr1 tst-attr2 tst-attr3 tst-default-attr \
+tests = tst-attr2 tst-attr3 tst-default-attr \
tst-mutex5 tst-mutex7 tst-mutex9 tst-mutex11 tst-mutex5a tst-mutex7a \
tst-mutex7robust tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 \
tst-mutexpi5 tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a \
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index fb467d8e79..5117110210 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -42,6 +42,7 @@ libpthread-routines += thrd_create thrd_detach thrd_exit thrd_join \
tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \
tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \
tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock \
+ tst-attr1 \
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
tst-basic7 \
tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex6 tst-mutex10 \
diff --git a/nptl/tst-attr1.c b/sysdeps/pthread/tst-attr1.c
similarity index 100%
rename from nptl/tst-attr1.c
rename to sysdeps/pthread/tst-attr1.c
--
2.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [hurd,commited 1/2] htl: Fix default guard size
@ 2020-02-09 17:32 Samuel Thibault
2020-02-09 17:32 ` [hurd,commited 2/2] pthread: Move some attr tests from nptl to sysdeps/pthread Samuel Thibault
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Thibault @ 2020-02-09 17:32 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
When it is not hardcoded by the architecture with PAGESIZE, we need to
use the dynamic values from __vm_page_size.
---
htl/pt-internal.h | 2 +-
sysdeps/htl/pt-attr.c | 2 +-
sysdeps/mach/hurd/htl/pt-sysdep.c | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/htl/pt-internal.h b/htl/pt-internal.h
index 9147b87740..064e795157 100644
--- a/htl/pt-internal.h
+++ b/htl/pt-internal.h
@@ -304,7 +304,7 @@ extern error_t __pthread_sigstate (struct __pthread *__restrict thread, int how,
\f
/* Default thread attributes. */
-extern const struct __pthread_attr __pthread_default_attr;
+extern struct __pthread_attr __pthread_default_attr;
/* Default barrier attributes. */
extern const struct __pthread_barrierattr __pthread_default_barrierattr;
diff --git a/sysdeps/htl/pt-attr.c b/sysdeps/htl/pt-attr.c
index 1426fac67e..fb41e4859f 100644
--- a/sysdeps/htl/pt-attr.c
+++ b/sysdeps/htl/pt-attr.c
@@ -23,7 +23,7 @@
#include <pt-internal.h>
-const struct __pthread_attr __pthread_default_attr = {
+struct __pthread_attr __pthread_default_attr = {
__schedparam: { sched_priority: 0 },
__stacksize: 0,
__stackaddr: NULL,
diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.c b/sysdeps/mach/hurd/htl/pt-sysdep.c
index 32a290c4ee..84d191475d 100644
--- a/sysdeps/mach/hurd/htl/pt-sysdep.c
+++ b/sysdeps/mach/hurd/htl/pt-sysdep.c
@@ -78,6 +78,10 @@ _init_routine (void *stack)
valid if the main thread terminates. */
thread->stack = 0;
+#ifndef PAGESIZE
+ __pthread_default_attr.__guardsize = __vm_page_size;
+#endif
+
___pthread_self = thread;
/* Decrease the number of threads, to take into account that the
--
2.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-09 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-09 17:32 [hurd,commited 1/2] htl: Fix default guard size Samuel Thibault
2020-02-09 17:32 ` [hurd,commited 2/2] pthread: Move some attr tests from nptl to sysdeps/pthread Samuel Thibault
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 read-only IMAP folder(s) and NNTP newsgroup(s).