Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include sched.h: Linux documents clone and __clone as only a...



details:   https://anonhg.NetBSD.org/src/rev/2d60232092bd
branches:  trunk
changeset: 368748:2d60232092bd
user:      wiz <wiz%NetBSD.org@localhost>
date:      Mon Aug 01 14:19:40 2022 +0000

description:
sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.

Ok martin@

diffstat:

 include/sched.h |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 6a3ff4f4b6d1 -r 2d60232092bd include/sched.h
--- a/include/sched.h   Mon Aug 01 10:30:28 2022 +0000
+++ b/include/sched.h   Mon Aug 01 14:19:40 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.13 2022/08/01 14:19:40 wiz Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -59,20 +59,26 @@
 #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 *);
 
+#endif /* _NETBSD_SOURCE */
+
+#if defined(_GNU_SOURCE)
+
 /* Historical functions, not defined in standard */
+/* Linux man page documents these functions as only available when
+ * _GNU_SOURCE is defined */
 pid_t   clone(int (*)(void *), void *, int, void *);
 pid_t  __clone(int (*)(void *), void *, int, void *);
 
+#endif /* _GNU_SOURCE */
+
 __END_DECLS
 
-#endif /* _NETBSD_SOURCE */
-
 #endif /* _SCHED_H_ */



Home | Main Index | Thread Index | Old Index