summaryrefslogtreecommitdiff
path: root/include/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sched.h')
-rw-r--r--include/sched.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/sched.h b/include/sched.h
index 0a3e423fd27..fabab1ef05d 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -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 @@ __END_DECLS
#define sched_yield __libc_thr_yield
#endif /* __LIBPTHREAD_SOURCE__ */
-#if defined(_NETBSD_SOURCE)
-
__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 *);
-pid_t __clone(int (*)(void *), void *, int, void *);
+#endif /* _GNU_SOURCE */
-__END_DECLS
+#if defined(_NETBSD_SOURCE)
+
+pid_t __clone(int (*)(void *), void *, int, void *);
#endif /* _NETBSD_SOURCE */
+__END_DECLS
+
#endif /* _SCHED_H_ */