Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h

by moving bits that are MI out into headers in compat/linux.

Reviewed by:	Chagin Dmitry  dmitry | gmail
MFC after:	2 weeks
This commit is contained in:
jhb 2013-01-29 18:41:30 +00:00
parent c007da37d3
commit 2617d9f095
18 changed files with 178 additions and 327 deletions

View File

@ -107,11 +107,6 @@ typedef struct {
/*
* Miscellaneous
*/
#define LINUX_NAME_MAX 255
#define LINUX_MAX_UTSNAME 65
#define LINUX_CTL_MAXNAME 10
#define LINUX_AT_COUNT 16 /* Count of used aux entry types.
* Keep this synchronized with
* elf_linux_fixup() code.
@ -127,11 +122,6 @@ struct l___sysctl_args
l_ulong __spare[4];
} __packed;
/* Scheduling policies */
#define LINUX_SCHED_OTHER 0
#define LINUX_SCHED_FIFO 1
#define LINUX_SCHED_RR 2
/* Resource limits */
#define LINUX_RLIMIT_CPU 0
#define LINUX_RLIMIT_FSIZE 1
@ -265,15 +255,6 @@ struct l_statfs64 {
l_int f_spare[6];
} __packed;
struct l_new_utsname {
char sysname[LINUX_MAX_UTSNAME];
char nodename[LINUX_MAX_UTSNAME];
char release[LINUX_MAX_UTSNAME];
char version[LINUX_MAX_UTSNAME];
char machine[LINUX_MAX_UTSNAME];
char domainname[LINUX_MAX_UTSNAME];
} __packed;
/*
* Signalling
*/
@ -535,26 +516,8 @@ struct l_rt_sigframe {
l_handler_t sf_handler;
} __packed;
extern int bsd_to_linux_signal[];
extern int linux_to_bsd_signal[];
extern struct sysentvec elf_linux_sysvec;
/*
* Pluggable ioctl handlers
*/
struct linux_ioctl_args;
struct thread;
typedef int linux_ioctl_function_t(struct thread *, struct linux_ioctl_args *);
struct linux_ioctl_handler {
linux_ioctl_function_t *func;
int low, high;
};
int linux_ioctl_register_handler(struct linux_ioctl_handler *h);
int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
/*
* open/fcntl flags
*/
@ -597,65 +560,6 @@ int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#define LINUX_F_WRLCK 1
#define LINUX_F_UNLCK 2
/*
* posix_fadvise advice
*/
#define LINUX_POSIX_FADV_NORMAL 0
#define LINUX_POSIX_FADV_RANDOM 1
#define LINUX_POSIX_FADV_SEQUENTIAL 2
#define LINUX_POSIX_FADV_WILLNEED 3
#define LINUX_POSIX_FADV_DONTNEED 4
#define LINUX_POSIX_FADV_NOREUSE 5
/*
* mount flags
*/
#define LINUX_MS_RDONLY 0x0001
#define LINUX_MS_NOSUID 0x0002
#define LINUX_MS_NODEV 0x0004
#define LINUX_MS_NOEXEC 0x0008
#define LINUX_MS_REMOUNT 0x0020
/*
* SystemV IPC defines
*/
#define LINUX_SEMOP 1
#define LINUX_SEMGET 2
#define LINUX_SEMCTL 3
#define LINUX_MSGSND 11
#define LINUX_MSGRCV 12
#define LINUX_MSGGET 13
#define LINUX_MSGCTL 14
#define LINUX_SHMAT 21
#define LINUX_SHMDT 22
#define LINUX_SHMGET 23
#define LINUX_SHMCTL 24
#define LINUX_IPC_RMID 0
#define LINUX_IPC_SET 1
#define LINUX_IPC_STAT 2
#define LINUX_IPC_INFO 3
#define LINUX_SHM_LOCK 11
#define LINUX_SHM_UNLOCK 12
#define LINUX_SHM_STAT 13
#define LINUX_SHM_INFO 14
#define LINUX_SHM_RDONLY 0x1000
#define LINUX_SHM_RND 0x2000
#define LINUX_SHM_REMAP 0x4000
/* semctl commands */
#define LINUX_GETPID 11
#define LINUX_GETVAL 12
#define LINUX_GETALL 13
#define LINUX_GETNCNT 14
#define LINUX_GETZCNT 15
#define LINUX_SETVAL 16
#define LINUX_SETALL 17
#define LINUX_SEM_STAT 18
#define LINUX_SEM_INFO 19
union l_semun {
l_int val;
l_uintptr_t buf;
@ -667,25 +571,6 @@ union l_semun {
/*
* Socket defines
*/
#define LINUX_SOCKET 1
#define LINUX_BIND 2
#define LINUX_CONNECT 3
#define LINUX_LISTEN 4
#define LINUX_ACCEPT 5
#define LINUX_GETSOCKNAME 6
#define LINUX_GETPEERNAME 7
#define LINUX_SOCKETPAIR 8
#define LINUX_SEND 9
#define LINUX_RECV 10
#define LINUX_SENDTO 11
#define LINUX_RECVFROM 12
#define LINUX_SHUTDOWN 13
#define LINUX_SETSOCKOPT 14
#define LINUX_GETSOCKOPT 15
#define LINUX_SENDMSG 16
#define LINUX_RECVMSG 17
#define LINUX_ACCEPT4 18
#define LINUX_SOL_SOCKET 1
#define LINUX_SOL_IP 0
#define LINUX_SOL_IPX 256
@ -714,24 +599,6 @@ union l_semun {
#define LINUX_SO_TIMESTAMP 29
#define LINUX_SO_ACCEPTCONN 30
#define LINUX_IP_TOS 1
#define LINUX_IP_TTL 2
#define LINUX_IP_HDRINCL 3
#define LINUX_IP_OPTIONS 4
#define LINUX_IP_MULTICAST_IF 32
#define LINUX_IP_MULTICAST_TTL 33
#define LINUX_IP_MULTICAST_LOOP 34
#define LINUX_IP_ADD_MEMBERSHIP 35
#define LINUX_IP_DROP_MEMBERSHIP 36
#define LINUX_TCP_NODELAY 1
#define LINUX_TCP_MAXSEG 2
#define LINUX_TCP_KEEPIDLE 4
#define LINUX_TCP_KEEPINTVL 5
#define LINUX_TCP_KEEPCNT 6
#define LINUX_TCP_MD5SIG 14
struct l_sockaddr {
l_ushort sa_family;
char sa_data[14];
@ -897,30 +764,6 @@ struct l_user_desc {
#define LINUX_GET_USEABLE(desc) \
(((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1)
#define LINUX_CLOCK_REALTIME 0
#define LINUX_CLOCK_MONOTONIC 1
#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
#define LINUX_CLOCK_REALTIME_HR 4
#define LINUX_CLOCK_MONOTONIC_HR 5
#define LINUX_CLONE_VM 0x00000100
#define LINUX_CLONE_FS 0x00000200
#define LINUX_CLONE_FILES 0x00000400
#define LINUX_CLONE_SIGHAND 0x00000800
#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */
#define LINUX_CLONE_VFORK 0x00004000
#define LINUX_CLONE_PARENT 0x00008000
#define LINUX_CLONE_THREAD 0x00010000
#define LINUX_CLONE_SETTLS 0x00080000
#define LINUX_CLONE_PARENT_SETTID 0x00100000
#define LINUX_CLONE_CHILD_CLEARTID 0x00200000
#define LINUX_CLONE_CHILD_SETTID 0x01000000
#define LINUX_THREADING_FLAGS \
(LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \
LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
struct iovec;
struct l_iovec32 {
@ -942,7 +785,4 @@ struct linux_robust_list_head {
l_uintptr_t pending_list;
};
int linux_set_upcall_kse(struct thread *td, register_t stack);
int linux_set_cloned_tls(struct thread *td, void *desc);
#endif /* !_AMD64_LINUX_H_ */

View File

@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
#include <amd64/linux32/linux32_proto.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_futex.h>
#include <compat/linux/linux_ioctl.h>
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_signal.h>

View File

@ -101,13 +101,9 @@ __FBSDID("$FreeBSD$");
#include <compat/freebsd32/freebsd32_util.h>
#endif
#ifdef COMPAT_LINUX32 /* XXX */
#include <machine/../linux32/linux.h>
#else
#include <machine/../linux/linux.h>
#endif
#include <compat/linux/linux_ioctl.h>
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_util.h>
#include <fs/pseudofs/pseudofs.h>
#include <fs/procfs/procfs.h>

View File

@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_dtrace.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_futex.h>
#include <compat/linux/linux_misc.h>
/**
* Special DTrace provider for the linuxulator.

View File

@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include <machine/../linux/linux.h>
#include <machine/../linux/linux_proto.h>
#endif
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_file.h>

View File

@ -35,4 +35,23 @@
#define LINUX_AT_REMOVEDIR 0x200
#define LINUX_AT_SYMLINK_FOLLOW 0x400
/*
* posix_fadvise advice
*/
#define LINUX_POSIX_FADV_NORMAL 0
#define LINUX_POSIX_FADV_RANDOM 1
#define LINUX_POSIX_FADV_SEQUENTIAL 2
#define LINUX_POSIX_FADV_WILLNEED 3
#define LINUX_POSIX_FADV_DONTNEED 4
#define LINUX_POSIX_FADV_NOREUSE 5
/*
* mount flags
*/
#define LINUX_MS_RDONLY 0x0001
#define LINUX_MS_NOSUID 0x0002
#define LINUX_MS_NODEV 0x0004
#define LINUX_MS_NOEXEC 0x0008
#define LINUX_MS_REMOUNT 0x0020
#endif /* !_LINUX_FILE_H_ */

View File

@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_dtrace.h>
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_misc.h>
/* DTrace init */
LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);

View File

@ -748,4 +748,20 @@ int linux_ifname(struct ifnet *, char *, size_t);
#define FBSD_LUSB_MAX 0xffff
#define FBSD_LUSB_MIN 0xffe0
/*
* Pluggable ioctl handlers
*/
struct linux_ioctl_args;
struct thread;
typedef int linux_ioctl_function_t(struct thread *, struct linux_ioctl_args *);
struct linux_ioctl_handler {
linux_ioctl_function_t *func;
int low, high;
};
int linux_ioctl_register_handler(struct linux_ioctl_handler *h);
int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#endif /* !_LINUX_IOCTL_H_ */

View File

@ -31,6 +31,48 @@
#ifndef _LINUX_IPC_H_
#define _LINUX_IPC_H_
/*
* SystemV IPC defines
*/
#define LINUX_SEMOP 1
#define LINUX_SEMGET 2
#define LINUX_SEMCTL 3
#define LINUX_MSGSND 11
#define LINUX_MSGRCV 12
#define LINUX_MSGGET 13
#define LINUX_MSGCTL 14
#define LINUX_SHMAT 21
#define LINUX_SHMDT 22
#define LINUX_SHMGET 23
#define LINUX_SHMCTL 24
#define LINUX_IPC_RMID 0
#define LINUX_IPC_SET 1
#define LINUX_IPC_STAT 2
#define LINUX_IPC_INFO 3
#define LINUX_MSG_INFO 12
#define LINUX_SHM_LOCK 11
#define LINUX_SHM_UNLOCK 12
#define LINUX_SHM_STAT 13
#define LINUX_SHM_INFO 14
#define LINUX_SHM_RDONLY 0x1000
#define LINUX_SHM_RND 0x2000
#define LINUX_SHM_REMAP 0x4000
/* semctl commands */
#define LINUX_GETPID 11
#define LINUX_GETVAL 12
#define LINUX_GETALL 13
#define LINUX_GETNCNT 14
#define LINUX_GETZCNT 15
#define LINUX_SETVAL 16
#define LINUX_SETALL 17
#define LINUX_SEM_STAT 18
#define LINUX_SEM_INFO 19
/*
* Version flags for semctl, msgctl, and shmctl commands
* These are passed as bitflags or-ed with the actual command
@ -135,8 +177,6 @@ int linux_shmctl(struct thread *, struct linux_shmctl_args *);
int linux_shmdt(struct thread *, struct linux_shmdt_args *);
int linux_shmget(struct thread *, struct linux_shmget_args *);
#define LINUX_MSG_INFO 12
#endif /* __i386__ || __amd64__ */
#endif /* _LINUX_IPC_H_ */

View File

@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
#endif
#include <compat/linux/linux_dtrace.h>
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
/* DTrace init */
LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);

View File

@ -31,6 +31,14 @@
#ifndef _LINUX_MISC_H_
#define _LINUX_MISC_H_
/*
* Miscellaneous
*/
#define LINUX_NAME_MAX 255
#define LINUX_MAX_UTSNAME 65
#define LINUX_CTL_MAXNAME 10
/* defines for prctl */
#define LINUX_PR_SET_PDEATHSIG 1 /* Second arg is a signal. */
#define LINUX_PR_GET_PDEATHSIG 2 /*
@ -67,11 +75,51 @@ extern const char *linux_platform;
#define __LINUX_NPXCW__ 0x37f
#endif
#define LINUX_CLONE_VM 0x00000100
#define LINUX_CLONE_FS 0x00000200
#define LINUX_CLONE_FILES 0x00000400
#define LINUX_CLONE_SIGHAND 0x00000800
#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */
#define LINUX_CLONE_VFORK 0x00004000
#define LINUX_CLONE_PARENT 0x00008000
#define LINUX_CLONE_THREAD 0x00010000
#define LINUX_CLONE_SETTLS 0x00080000
#define LINUX_CLONE_PARENT_SETTID 0x00100000
#define LINUX_CLONE_CHILD_CLEARTID 0x00200000
#define LINUX_CLONE_CHILD_SETTID 0x01000000
#define LINUX_THREADING_FLAGS \
(LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \
LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
/* Scheduling policies */
#define LINUX_SCHED_OTHER 0
#define LINUX_SCHED_FIFO 1
#define LINUX_SCHED_RR 2
struct l_new_utsname {
char sysname[LINUX_MAX_UTSNAME];
char nodename[LINUX_MAX_UTSNAME];
char release[LINUX_MAX_UTSNAME];
char version[LINUX_MAX_UTSNAME];
char machine[LINUX_MAX_UTSNAME];
char domainname[LINUX_MAX_UTSNAME];
};
#define LINUX_CLOCK_REALTIME 0
#define LINUX_CLOCK_MONOTONIC 1
#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
#define LINUX_CLOCK_REALTIME_HR 4
#define LINUX_CLOCK_MONOTONIC_HR 5
extern int stclohz;
#define __WCLONE 0x80000000
int linux_common_wait(struct thread *td, int pid, int *status,
int options, struct rusage *ru);
int linux_set_upcall_kse(struct thread *td, register_t stack);
int linux_set_cloned_tls(struct thread *td, void *desc);
#endif /* _LINUX_MISC_H_ */

View File

@ -33,6 +33,9 @@
#define LINUX_SI_TKILL -6;
extern int bsd_to_linux_signal[];
extern int linux_to_bsd_signal[];
void linux_to_bsd_sigset(l_sigset_t *, sigset_t *);
void bsd_to_linux_sigset(sigset_t *, l_sigset_t *);
int linux_do_sigaction(struct thread *, int, l_sigaction_t *, l_sigaction_t *);

View File

@ -116,4 +116,44 @@ struct l_ucred {
uint32_t gid;
};
/* Operations for socketcall */
#define LINUX_SOCKET 1
#define LINUX_BIND 2
#define LINUX_CONNECT 3
#define LINUX_LISTEN 4
#define LINUX_ACCEPT 5
#define LINUX_GETSOCKNAME 6
#define LINUX_GETPEERNAME 7
#define LINUX_SOCKETPAIR 8
#define LINUX_SEND 9
#define LINUX_RECV 10
#define LINUX_SENDTO 11
#define LINUX_RECVFROM 12
#define LINUX_SHUTDOWN 13
#define LINUX_SETSOCKOPT 14
#define LINUX_GETSOCKOPT 15
#define LINUX_SENDMSG 16
#define LINUX_RECVMSG 17
#define LINUX_ACCEPT4 18
/* Socket options */
#define LINUX_IP_TOS 1
#define LINUX_IP_TTL 2
#define LINUX_IP_HDRINCL 3
#define LINUX_IP_OPTIONS 4
#define LINUX_IP_MULTICAST_IF 32
#define LINUX_IP_MULTICAST_TTL 33
#define LINUX_IP_MULTICAST_LOOP 34
#define LINUX_IP_ADD_MEMBERSHIP 35
#define LINUX_IP_DROP_MEMBERSHIP 36
#define LINUX_TCP_NODELAY 1
#define LINUX_TCP_MAXSEG 2
#define LINUX_TCP_KEEPIDLE 4
#define LINUX_TCP_KEEPINTVL 5
#define LINUX_TCP_KEEPCNT 6
#define LINUX_TCP_MD5SIG 14
#endif /* _LINUX_SOCKET_H_ */

View File

@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
#endif
#include <compat/linux/linux_dtrace.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_util.h>
#define LINUX_CTL_KERN 1

View File

@ -60,6 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp
#endif
#include <compat/linux/linux_dtrace.h>
#include <compat/linux/linux_misc.h>
/* DTrace init */
LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);

View File

@ -101,11 +101,6 @@ typedef struct {
/*
* Miscellaneous
*/
#define LINUX_NAME_MAX 255
#define LINUX_MAX_UTSNAME 65
#define LINUX_CTL_MAXNAME 10
#define LINUX_AT_COUNT 16 /* Count of used aux entry types.
* Keep this synchronized with
* elf_linux_fixup() code.
@ -121,11 +116,6 @@ struct l___sysctl_args
l_ulong __spare[4];
};
/* Scheduling policies */
#define LINUX_SCHED_OTHER 0
#define LINUX_SCHED_FIFO 1
#define LINUX_SCHED_RR 2
/* Resource limits */
#define LINUX_RLIMIT_CPU 0
#define LINUX_RLIMIT_FSIZE 1
@ -240,15 +230,6 @@ struct l_statfs64 {
l_int f_spare[6];
};
struct l_new_utsname {
char sysname[LINUX_MAX_UTSNAME];
char nodename[LINUX_MAX_UTSNAME];
char release[LINUX_MAX_UTSNAME];
char version[LINUX_MAX_UTSNAME];
char machine[LINUX_MAX_UTSNAME];
char domainname[LINUX_MAX_UTSNAME];
};
/*
* Signalling
*/
@ -510,27 +491,9 @@ struct l_rt_sigframe {
l_handler_t sf_handler;
};
extern int bsd_to_linux_signal[];
extern int linux_to_bsd_signal[];
extern struct sysentvec linux_sysvec;
extern struct sysentvec elf_linux_sysvec;
/*
* Pluggable ioctl handlers
*/
struct linux_ioctl_args;
struct thread;
typedef int linux_ioctl_function_t(struct thread *, struct linux_ioctl_args *);
struct linux_ioctl_handler {
linux_ioctl_function_t *func;
int low, high;
};
int linux_ioctl_register_handler(struct linux_ioctl_handler *h);
int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
/*
* open/fcntl flags
*/
@ -573,65 +536,6 @@ int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#define LINUX_F_WRLCK 1
#define LINUX_F_UNLCK 2
/*
* posix_fadvise advice
*/
#define LINUX_POSIX_FADV_NORMAL 0
#define LINUX_POSIX_FADV_RANDOM 1
#define LINUX_POSIX_FADV_SEQUENTIAL 2
#define LINUX_POSIX_FADV_WILLNEED 3
#define LINUX_POSIX_FADV_DONTNEED 4
#define LINUX_POSIX_FADV_NOREUSE 5
/*
* mount flags
*/
#define LINUX_MS_RDONLY 0x0001
#define LINUX_MS_NOSUID 0x0002
#define LINUX_MS_NODEV 0x0004
#define LINUX_MS_NOEXEC 0x0008
#define LINUX_MS_REMOUNT 0x0020
/*
* SystemV IPC defines
*/
#define LINUX_SEMOP 1
#define LINUX_SEMGET 2
#define LINUX_SEMCTL 3
#define LINUX_MSGSND 11
#define LINUX_MSGRCV 12
#define LINUX_MSGGET 13
#define LINUX_MSGCTL 14
#define LINUX_SHMAT 21
#define LINUX_SHMDT 22
#define LINUX_SHMGET 23
#define LINUX_SHMCTL 24
#define LINUX_IPC_RMID 0
#define LINUX_IPC_SET 1
#define LINUX_IPC_STAT 2
#define LINUX_IPC_INFO 3
#define LINUX_SHM_LOCK 11
#define LINUX_SHM_UNLOCK 12
#define LINUX_SHM_STAT 13
#define LINUX_SHM_INFO 14
#define LINUX_SHM_RDONLY 0x1000
#define LINUX_SHM_RND 0x2000
#define LINUX_SHM_REMAP 0x4000
/* semctl commands */
#define LINUX_GETPID 11
#define LINUX_GETVAL 12
#define LINUX_GETALL 13
#define LINUX_GETNCNT 14
#define LINUX_GETZCNT 15
#define LINUX_SETVAL 16
#define LINUX_SETALL 17
#define LINUX_SEM_STAT 18
#define LINUX_SEM_INFO 19
union l_semun {
l_int val;
struct l_semid_ds *buf;
@ -643,25 +547,6 @@ union l_semun {
/*
* Socket defines
*/
#define LINUX_SOCKET 1
#define LINUX_BIND 2
#define LINUX_CONNECT 3
#define LINUX_LISTEN 4
#define LINUX_ACCEPT 5
#define LINUX_GETSOCKNAME 6
#define LINUX_GETPEERNAME 7
#define LINUX_SOCKETPAIR 8
#define LINUX_SEND 9
#define LINUX_RECV 10
#define LINUX_SENDTO 11
#define LINUX_RECVFROM 12
#define LINUX_SHUTDOWN 13
#define LINUX_SETSOCKOPT 14
#define LINUX_GETSOCKOPT 15
#define LINUX_SENDMSG 16
#define LINUX_RECVMSG 17
#define LINUX_ACCEPT4 18
#define LINUX_SOL_SOCKET 1
#define LINUX_SOL_IP 0
#define LINUX_SOL_IPX 256
@ -690,24 +575,6 @@ union l_semun {
#define LINUX_SO_TIMESTAMP 29
#define LINUX_SO_ACCEPTCONN 30
#define LINUX_IP_TOS 1
#define LINUX_IP_TTL 2
#define LINUX_IP_HDRINCL 3
#define LINUX_IP_OPTIONS 4
#define LINUX_IP_MULTICAST_IF 32
#define LINUX_IP_MULTICAST_TTL 33
#define LINUX_IP_MULTICAST_LOOP 34
#define LINUX_IP_ADD_MEMBERSHIP 35
#define LINUX_IP_DROP_MEMBERSHIP 36
#define LINUX_TCP_NODELAY 1
#define LINUX_TCP_MAXSEG 2
#define LINUX_TCP_KEEPIDLE 4
#define LINUX_TCP_KEEPINTVL 5
#define LINUX_TCP_KEEPCNT 6
#define LINUX_TCP_MD5SIG 14
struct l_sockaddr {
l_ushort sa_family;
char sa_data[14];
@ -867,30 +734,6 @@ struct l_desc_struct {
#define LINUX_GET_USEABLE(desc) \
(((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1)
#define LINUX_CLOCK_REALTIME 0
#define LINUX_CLOCK_MONOTONIC 1
#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
#define LINUX_CLOCK_REALTIME_HR 4
#define LINUX_CLOCK_MONOTONIC_HR 5
#define LINUX_CLONE_VM 0x00000100
#define LINUX_CLONE_FS 0x00000200
#define LINUX_CLONE_FILES 0x00000400
#define LINUX_CLONE_SIGHAND 0x00000800
#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */
#define LINUX_CLONE_VFORK 0x00004000
#define LINUX_CLONE_PARENT 0x00008000
#define LINUX_CLONE_THREAD 0x00010000
#define LINUX_CLONE_SETTLS 0x00080000
#define LINUX_CLONE_PARENT_SETTID 0x00100000
#define LINUX_CLONE_CHILD_CLEARTID 0x00200000
#define LINUX_CLONE_CHILD_SETTID 0x01000000
#define LINUX_THREADING_FLAGS \
(LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \
LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
/* robust futexes */
struct linux_robust_list {
struct linux_robust_list *next;
@ -902,7 +745,4 @@ struct linux_robust_list_head {
struct linux_robust_list *pending_list;
};
int linux_set_upcall_kse(struct thread *td, register_t stack);
int linux_set_cloned_tls(struct thread *td, void *desc);
#endif /* !_I386_LINUX_H_ */

View File

@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <i386/linux/linux.h>
#include <i386/linux/linux_proto.h>
#include <compat/linux/linux_signal.h>
#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU)
#define CPU_ENABLE_SSE

View File

@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include <i386/linux/linux_proto.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_futex.h>
#include <compat/linux/linux_ioctl.h>
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_signal.h>