summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2019-09-13 06:54:09 +0000
committermartin <martin@NetBSD.org>2019-09-13 06:54:09 +0000
commit1033a0649c4d4e9e47df06a506dee27618f40be8 (patch)
tree0fd7b6c073008186705a7ac893bcb670a6d090cd /lib
parente8d814379019845156c75cd5b346b5ac840072fa (diff)
Pull up following revision(s) (requested by kamil in ticket #198):
lib/libpthread/thrd.c: revision 1.4 lib/libpthread/threads.h: revision 1.3 Switch back _Noreturn to __dead in C11 threads There is an ongoing discussion to unify unreturn attribute between C and C++, making a compatible version, shared between languages. Instead of picking C11-only approach here, switch back to __dead that wraps the compiler extension for the same purpose. This change makes this header more compatible with C++ and pre-C11. Reference: <a rel="nofollow" href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2410.pdf">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2410.pdf</a>
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/thrd.c6
-rw-r--r--lib/libpthread/threads.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libpthread/thrd.c b/lib/libpthread/thrd.c
index 886c18f190d..36967d3dcd4 100644
--- a/lib/libpthread/thrd.c
+++ b/lib/libpthread/thrd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: thrd.c,v 1.3 2019/04/29 20:11:43 kamil Exp $ */
+/* $NetBSD: thrd.c,v 1.3.4.1 2019/09/13 06:54:09 martin Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: thrd.c,v 1.3 2019/04/29 20:11:43 kamil Exp $");
+__RCSID("$NetBSD: thrd.c,v 1.3.4.1 2019/09/13 06:54:09 martin Exp $");
#include <assert.h>
#include <errno.h>
@@ -122,7 +122,7 @@ thrd_equal(thrd_t t1, thrd_t t2)
return pthread_equal(t1, t2);
}
-_Noreturn void
+__dead void
thrd_exit(int res)
{
diff --git a/lib/libpthread/threads.h b/lib/libpthread/threads.h
index 0a2417e483f..56fe8a24997 100644
--- a/lib/libpthread/threads.h
+++ b/lib/libpthread/threads.h
@@ -1,4 +1,4 @@
-/* $NetBSD: threads.h,v 1.2 2019/04/24 18:47:54 kamil Exp $ */
+/* $NetBSD: threads.h,v 1.2.4.1 2019/09/13 06:54:09 martin Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@ int thrd_create(thrd_t *, thrd_start_t, void *);
thrd_t thrd_current(void);
int thrd_detach(thrd_t);
int thrd_equal(thrd_t, thrd_t);
-_Noreturn void thrd_exit(int);
+__dead void thrd_exit(int);
int thrd_join(thrd_t, int *);
int thrd_sleep(const struct timespec *, struct timespec *);
void thrd_yield(void);