]> sourceware.org Git - newlib-cygwin.git/commitdiff
sched.h: Declare affinity functions only on targets supporting them
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 12 Aug 2019 10:13:20 +0000 (12:13 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 12 Aug 2019 15:30:20 +0000 (17:30 +0200)
newlib/libc/include/sched.h

index 79b775e220c7be356c8aa6e101f318e5d7ec9b16..31599aa7e6ca883df0531835ba234425bb76a317 100644 (file)
@@ -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
This page took 0.029839 seconds and 5 git commands to generate.