sched.h: Declare affinity functions only on targets supporting them
This commit is contained in:
parent
3b4685bf97
commit
8ef2461000
|
@ -93,10 +93,16 @@ int sched_yield( void );
|
||||||
#if __GNU_VISIBLE
|
#if __GNU_VISIBLE
|
||||||
int sched_getcpu(void);
|
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_getaffinity (pid_t, size_t, cpu_set_t *);
|
||||||
int sched_get_thread_affinity (void *, 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_setaffinity (pid_t, size_t, const cpu_set_t *);
|
||||||
int sched_set_thread_affinity (void *, size_t, const cpu_set_t *);
|
int sched_set_thread_affinity (void *, size_t, const cpu_set_t *);
|
||||||
|
#endif /* _SYS_CPUSET_H_ */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue