rework ldso handling of global symbol table for consistency
[musl] / include / sched.h
index 7e88f09..d1cccb7 100644 (file)
@@ -59,6 +59,7 @@ int     sched_yield(void);
 #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
@@ -81,7 +82,7 @@ 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)/8U >= (size) ? 0 : \
-       ((set)->__bits[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
+       (((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, &=~)
@@ -93,8 +94,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++) \
-               __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, &)