projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
setvbuf: minor comment typo fix
[musl]
/
include
/
sched.h
diff --git
a/include/sched.h
b/include/sched.h
index
6a6b2fc
..
05d40b1
100644
(file)
--- a/
include/sched.h
+++ b/
include/sched.h
@@
-38,6
+38,7
@@
int sched_yield(void);
#define SCHED_RR 2
#define SCHED_BATCH 3
#define SCHED_IDLE 5
#define SCHED_RR 2
#define SCHED_BATCH 3
#define SCHED_IDLE 5
+#define SCHED_DEADLINE 6
#define SCHED_RESET_ON_FORK 0x40000000
#ifdef _GNU_SOURCE
#define SCHED_RESET_ON_FORK 0x40000000
#ifdef _GNU_SOURCE
@@
-58,6
+59,7
@@
int sched_yield(void);
#define CLONE_DETACHED 0x00400000
#define CLONE_UNTRACED 0x00800000
#define CLONE_CHILD_SETTID 0x01000000
#define CLONE_DETACHED 0x00400000
#define CLONE_UNTRACED 0x00800000
#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_NEWCGROUP 0x02000000
#define CLONE_NEWUTS 0x04000000
#define CLONE_NEWIPC 0x08000000
#define CLONE_NEWUSER 0x10000000
#define CLONE_NEWUTS 0x04000000
#define CLONE_NEWIPC 0x08000000
#define CLONE_NEWUSER 0x10000000
@@
-70,16
+72,18
@@
int setns(int, int);
void *memcpy(void *__restrict, const void *__restrict, size_t);
int memcmp(const void *, const void *, size_t);
void *memcpy(void *__restrict, const void *__restrict, size_t);
int memcmp(const void *, const void *, size_t);
+void *memset (void *, int, size_t);
void *calloc(size_t, size_t);
void free(void *);
typedef struct cpu_set_t { unsigned long __bits[128/sizeof(long)]; } cpu_set_t;
int __sched_cpucount(size_t, const cpu_set_t *);
void *calloc(size_t, size_t);
void free(void *);
typedef struct cpu_set_t { unsigned long __bits[128/sizeof(long)]; } cpu_set_t;
int __sched_cpucount(size_t, const cpu_set_t *);
+int sched_getcpu(void);
int sched_getaffinity(pid_t, size_t, cpu_set_t *);
int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
int sched_getaffinity(pid_t, size_t, cpu_set_t *);
int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
-#define __CPU_op_S(i, size, set, op) ( (i)/8 >= (size) ? 0 : \
- ((
set)->__bits
[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
+#define __CPU_op_S(i, size, set, op) ( (i)/8
U
>= (size) ? 0 : \
+ ((
(unsigned long *)(set))
[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
#define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=)
#define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &=~)
#define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=)
#define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &=~)
@@
-91,8
+95,8
@@
static __inline void __CPU_##func##_S(size_t __size, cpu_set_t *__dest, \
{ \
size_t __i; \
for (__i=0; __i<__size/sizeof(long); __i++) \
{ \
size_t __i; \
for (__i=0; __i<__size/sizeof(long); __i++) \
-
__dest->__bits[__i] = __src1->__bits
[__i] \
- op
__src2->__bits
[__i] ; \
+
((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)
[__i] \
+ op
((unsigned long *)__src2)
[__i] ; \
}
__CPU_op_func_S(AND, &)
}
__CPU_op_func_S(AND, &)
@@
-122,7
+126,7
@@
__CPU_op_func_S(XOR, ^)
#define CPU_XOR(d,s1,s2) CPU_XOR_S(sizeof(cpu_set_t),d,s1,s2)
#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t),set)
#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t),set)
#define CPU_XOR(d,s1,s2) CPU_XOR_S(sizeof(cpu_set_t),d,s1,s2)
#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t),set)
#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t),set)
-#define CPU_EQUAL(s
et) CPU_EQUAL_S(sizeof(cpu_set_t),set
)
+#define CPU_EQUAL(s
1,s2) CPU_EQUAL_S(sizeof(cpu_set_t),s1,s2
)
#endif
#endif