Cygwin: Fix return value of sched_getaffinity
Have sched_getaffinity() interface like glibc's, and provide an undocumented internal interface __sched_getaffinity_sys() like the Linux kernel's sched_getaffinity() for benefit of taskset(1).
This commit is contained in:
committed by
Corinna Vinschen
parent
383e19ca55
commit
fff17ad73f
@ -9,6 +9,10 @@ details. */
|
||||
#ifndef _SYS_CPUSET_H_
|
||||
#define _SYS_CPUSET_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef __SIZE_TYPE__ __cpu_mask;
|
||||
#define __CPU_SETSIZE 1024 // maximum number of logical processors tracked
|
||||
#define __NCPUBITS (8 * sizeof (__cpu_mask)) // max size of processor group
|
||||
@ -22,4 +26,10 @@ typedef struct
|
||||
__cpu_mask __bits[__CPU_GROUPMAX];
|
||||
} cpu_set_t;
|
||||
|
||||
int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_CPUSET_H_ */
|
||||
|
Reference in New Issue
Block a user