Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src Pull up following revision(s) (requested by wiz in ticket...
details: https://anonhg.NetBSD.org/src/rev/b9fb485749c1
branches: netbsd-9
changeset: 368766:b9fb485749c1
user: martin <martin%NetBSD.org@localhost>
date: Wed Aug 03 10:42:02 2022 +0000
description:
Pull up following revision(s) (requested by wiz in ticket #1484):
lib/libc/sys/clone.2: revision 1.14
lib/libc/sys/clone.2: revision 1.15
include/sched.h: revision 1.13
include/sched.h: revision 1.14
include/sched.h: revision 1.15
Remove mentions of CLONE_PID and CLONE_STOPPED
CLONE_PID was removed in Linux 2.5.15 and recycled for
CLONE_PIDFD since Linux 5.2.
CLONE_STOPPED was removed in Linux 2.6.38 and recycled
for CLONE_NEWCGROUP since Linux 4.6.
sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.
Ok martin@
clone(2): document that _GNU_SOURCE must be defined for the prototypes
sched.h: format comment to follow KNF
requested by thorpej@
sched.h: keep __clone() visible under _NETBSD_SOURCE
diffstat:
include/sched.h | 24 ++++++++++++++++++------
lib/libc/sys/clone.2 | 9 +++------
2 files changed, 21 insertions(+), 12 deletions(-)
diffs (88 lines):
diff -r 3f8896628a9a -r b9fb485749c1 include/sched.h
--- a/include/sched.h Mon Aug 01 09:37:01 2022 +0000
+++ b/include/sched.h Wed Aug 03 10:42:02 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.h,v 1.12 2009/01/11 03:04:12 christos Exp $ */
+/* $NetBSD: sched.h,v 1.12.52.1 2022/08/03 10:42:02 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -59,20 +59,32 @@
#define sched_yield __libc_thr_yield
#endif /* __LIBPTHREAD_SOURCE__ */
-#if defined(_NETBSD_SOURCE)
+__BEGIN_DECLS
-__BEGIN_DECLS
+#if defined(_NETBSD_SOURCE)
/* Process affinity functions (not portable) */
int sched_getaffinity_np(pid_t, size_t, cpuset_t *);
int sched_setaffinity_np(pid_t, size_t, cpuset_t *);
-/* Historical functions, not defined in standard */
+#endif /* _NETBSD_SOURCE */
+
+#if defined(_GNU_SOURCE)
+
+/*
+ * Historical functions, not defined in standard
+ * Linux man page documents clone() as only available when
+ * _GNU_SOURCE is defined
+ */
pid_t clone(int (*)(void *), void *, int, void *);
+#endif /* _GNU_SOURCE */
+
+#if defined(_NETBSD_SOURCE)
+
pid_t __clone(int (*)(void *), void *, int, void *);
+#endif /* _NETBSD_SOURCE */
+
__END_DECLS
-#endif /* _NETBSD_SOURCE */
-
#endif /* _SCHED_H_ */
diff -r 3f8896628a9a -r b9fb485749c1 lib/libc/sys/clone.2
--- a/lib/libc/sys/clone.2 Mon Aug 01 09:37:01 2022 +0000
+++ b/lib/libc/sys/clone.2 Wed Aug 03 10:42:02 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: clone.2,v 1.13 2012/01/29 11:44:54 wiz Exp $
+.\" $NetBSD: clone.2,v 1.13.42.1 2022/08/03 10:42:02 martin Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd May 4, 2010
+.Dd August 1, 2022
.Dt CLONE 2
.Os
.Sh NAME
@@ -37,6 +37,7 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
+.Fd #define _GNU_SOURCE
.In sched.h
.Ft pid_t
.Fn clone "int (*func)(void *arg)" "void *stack" "int flags" "void *arg"
@@ -189,14 +190,10 @@
.It
.Dv CLONE_PARENT_SETTID
.It
-.Dv CLONE_PID
-.It
.Dv CLONE_PTRACE
.It
.Dv CLONE_SETTLS
.It
-.Dv CLONE_STOPPED
-.It
.Dv CLONE_SYSVSEM
.It
.Dv CLONE_THREAD
Home |
Main Index |
Thread Index |
Old Index