public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] sched.h: Declare affinity functions only on targets supporting them
@ 2019-08-13 7:38 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-08-13 7:38 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8ef2461000797cf01d88eff11189b388709c0ac8
commit 8ef2461000797cf01d88eff11189b388709c0ac8
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Mon Aug 12 12:13:20 2019 +0200
sched.h: Declare affinity functions only on targets supporting them
Diff:
---
newlib/libc/include/sched.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h
index 79b775e..31599aa 100644
--- a/newlib/libc/include/sched.h
+++ b/newlib/libc/include/sched.h
@@ -93,10 +93,16 @@ int sched_yield( void );
#if __GNU_VISIBLE
int sched_getcpu(void);
+/* The following functions should only be declared if the type
+ cpu_set_t is defined through indirect inclusion of sys/cpuset.h,
+ only available on some targets. */
+#ifdef _SYS_CPUSET_H_
int sched_getaffinity (pid_t, size_t, cpu_set_t *);
int sched_get_thread_affinity (void *, size_t, cpu_set_t *);
int sched_setaffinity (pid_t, size_t, const cpu_set_t *);
int sched_set_thread_affinity (void *, size_t, const cpu_set_t *);
+#endif /* _SYS_CPUSET_H_ */
+
#endif
#ifdef __cplusplus
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-13 7:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 7:38 [newlib-cygwin] sched.h: Declare affinity functions only on targets supporting them Corinna Vinschen
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).