mirror of git://git.musl-libc.org/musl
move IPC_64 from public bits/ipc.h to syscall_arch.h
the definition of the IPC_64 macro controls the interface between libc and the kernel through syscalls; it's not a public API. the meaning is rather obscure. long ago, Linux's sysvipc *id_ds structures used 16-bit uids/gids and wrong types for a few other fields. this was in the libc5 era, before glibc. the IPC_64 flag (64 is a misnomer; it's more like 32) tells the kernel to use the modern[-ish] versions of the structures. the definition of IPC_64 has nothing to do with whether the arch is 32- or 64-bit. rather, due to either historical accident or intentional obnoxiousness, the kernel only accepts and masks off the 0x100 IPC_64 flag conditional on CONFIG_ARCH_WANT_IPC_PARSE_VERSION, i.e. for archs that want to provide, or that accidentally provided, both. for archs which don't define this option, no masking is performed and commands with the 0x100 bit set will fail as invalid. so ultimately, the definition is just a matter of matching an arbitrary switch defined per-arch in the kernel.
This commit is contained in:
parent
722a1ae335
commit
f56d57f8a7
|
@ -10,5 +10,3 @@ struct ipc_perm {
|
|||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -74,3 +74,5 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
|
|||
#define VDSO_USEFUL
|
||||
#define VDSO_CGT_SYM "__kernel_clock_gettime"
|
||||
#define VDSO_CGT_VER "LINUX_2.6.39"
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -9,5 +9,3 @@ struct ipc_perm {
|
|||
long __pad1;
|
||||
long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0x100
|
||||
|
|
|
@ -10,5 +10,3 @@ struct ipc_perm {
|
|||
unsigned long __unused1;
|
||||
unsigned long __unused2;
|
||||
};
|
||||
|
||||
#define IPC_64 0x100
|
||||
|
|
|
@ -9,5 +9,3 @@ struct ipc_perm {
|
|||
long __pad1;
|
||||
long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -111,3 +111,5 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
|
|||
"r23", "r25", "r27", "r29", "r31");
|
||||
return r11;
|
||||
}
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -10,6 +10,3 @@ struct ipc_perm {
|
|||
long long __pad2;
|
||||
long long __pad3;
|
||||
};
|
||||
|
||||
#define IPC_64 0x100
|
||||
|
||||
|
|
|
@ -10,6 +10,3 @@ struct ipc_perm {
|
|||
long long __pad2;
|
||||
long long __pad3;
|
||||
};
|
||||
|
||||
#define IPC_64 0x100
|
||||
|
||||
|
|
|
@ -10,5 +10,3 @@ struct ipc_perm {
|
|||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -74,3 +74,5 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
|
|||
/* We don't have a clock_gettime function.
|
||||
#define VDSO_CGT_SYM "__vdso_clock_gettime"
|
||||
#define VDSO_CGT_VER "LINUX_2.6" */
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -10,5 +10,3 @@ struct ipc_perm {
|
|||
unsigned long __pad2;
|
||||
unsigned long __pad3;
|
||||
};
|
||||
|
||||
#define IPC_64 0x100
|
||||
|
|
|
@ -9,5 +9,3 @@ struct ipc_perm {
|
|||
long long __pad1;
|
||||
long long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -87,3 +87,5 @@ static __inline long __syscall6(long long n, long long a1, long long a2, long lo
|
|||
#define SYS_rt_sigtimedwait_time64 SYS_rt_sigtimedwait
|
||||
#define SYS_futex_time64 SYS_futex
|
||||
#define SYS_sched_rr_get_interval_time64 SYS_sched_rr_get_interval
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -9,5 +9,3 @@ struct ipc_perm {
|
|||
long __pad1;
|
||||
long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -66,3 +66,5 @@ static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long
|
|||
#define VDSO_CGT_VER "LINUX_2.6"
|
||||
#define VDSO_GETCPU_SYM "__vdso_getcpu"
|
||||
#define VDSO_GETCPU_VER "LINUX_2.6"
|
||||
|
||||
#define IPC_64 0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "syscall.h"
|
||||
|
||||
#define IPCOP_semop 1
|
||||
#define IPCOP_semget 2
|
||||
#define IPCOP_semctl 3
|
||||
|
@ -10,3 +12,7 @@
|
|||
#define IPCOP_shmdt 22
|
||||
#define IPCOP_shmget 23
|
||||
#define IPCOP_shmctl 24
|
||||
|
||||
#ifndef IPC_64
|
||||
#define IPC_64 0x100
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue