2 * Copyright (c) 1994-1996 Søren Schmidt
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer
10 * in this position and unchanged.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 * $FreeBSD: src/sys/i386/linux/linux.h,v 1.41.2.4 2003/01/06 09:19:43 fjoe Exp $
29 * $DragonFly: src/sys/emulation/linux/i386/linux.h,v 1.9 2006/10/23 21:50:32 dillon Exp $
32 #ifndef _EMULATION_LINUX_ARCH_LINUX_H_
33 #define _EMULATION_LINUX_ARCH_LINUX_H_
35 #include <sys/signal.h> /* for sigval union */
37 #include "linux_syscall.h"
42 extern u_char linux_debug_map
[];
43 #define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name)
44 #define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)(curthread->td_proc ? curthread->td_proc->p_pid : -1)
45 #define LMSG(fmt) "linux(%ld): "fmt"\n", (long)(curthread->td_proc ? curthread->td_proc->p_pid : -1)
52 MALLOC_DECLARE(M_LINUX
);
55 #define PTRIN(v) (void *)(v)
56 #define PTROUT(v) (l_uintptr_t)(v)
59 * Provide a separate set of types for the Linux types.
62 typedef int32_t l_long
;
63 typedef int64_t l_longlong
;
64 typedef short l_short
;
65 typedef unsigned int l_uint
;
66 typedef uint32_t l_ulong
;
67 typedef uint64_t l_ulonglong
;
68 typedef unsigned short l_ushort
;
70 typedef l_ulong l_uintptr_t
;
71 typedef char *l_caddr_t
;
72 typedef l_long l_clock_t
;
73 typedef l_int l_daddr_t
;
74 typedef l_ushort l_dev_t
;
75 typedef l_uint l_gid_t
;
76 typedef l_ushort l_gid16_t
;
77 typedef l_ulong l_ino_t
;
78 typedef l_int l_key_t
;
79 typedef l_longlong l_loff_t
;
80 typedef l_ushort l_mode_t
;
81 typedef l_long l_off_t
;
82 typedef l_int l_pid_t
;
83 typedef l_uint l_size_t
;
84 typedef l_long l_suseconds_t
;
85 typedef l_long l_time_t
;
86 typedef l_uint l_uid_t
;
87 typedef l_ushort l_uid16_t
;
88 typedef l_int l_timer_t
;
89 typedef l_int l_mqd_t
;
97 l_suseconds_t tv_usec
;
100 #define l_fd_set fd_set
105 #define LINUX_NAME_MAX 255
106 #define LINUX_MAX_UTSNAME 65
108 #define LINUX_CTL_MAXNAME 10
110 struct l___sysctl_args
121 /* Scheduling policies */
122 #define LINUX_SCHED_OTHER 0
123 #define LINUX_SCHED_FIFO 1
124 #define LINUX_SCHED_RR 2
126 /* Resource limits */
127 #define LINUX_RLIMIT_CPU 0
128 #define LINUX_RLIMIT_FSIZE 1
129 #define LINUX_RLIMIT_DATA 2
130 #define LINUX_RLIMIT_STACK 3
131 #define LINUX_RLIMIT_CORE 4
132 #define LINUX_RLIMIT_RSS 5
133 #define LINUX_RLIMIT_NPROC 6
134 #define LINUX_RLIMIT_NOFILE 7
135 #define LINUX_RLIMIT_MEMLOCK 8
136 #define LINUX_RLIMIT_AS 9 /* address space limit */
138 #define LINUX_RLIM_NLIMITS 10
146 #define LINUX_MAP_SHARED 0x0001
147 #define LINUX_MAP_PRIVATE 0x0002
148 #define LINUX_MAP_FIXED 0x0010
149 #define LINUX_MAP_ANON 0x0020
150 #define LINUX_MAP_GROWSDOWN 0x0100
153 * stat family of syscalls
173 struct l_timespec st_atimespec
;
174 struct l_timespec st_mtimespec
;
175 struct l_timespec st_ctimespec
;
194 struct l_timespec st_atimespec
;
195 struct l_timespec st_mtimespec
;
196 struct l_timespec st_ctimespec
;
213 struct l_new_utsname
{
214 char sysname
[LINUX_MAX_UTSNAME
];
215 char nodename
[LINUX_MAX_UTSNAME
];
216 char release
[LINUX_MAX_UTSNAME
];
217 char version
[LINUX_MAX_UTSNAME
];
218 char machine
[LINUX_MAX_UTSNAME
];
219 char domainname
[LINUX_MAX_UTSNAME
];
225 #define LINUX_SIGHUP 1
226 #define LINUX_SIGINT 2
227 #define LINUX_SIGQUIT 3
228 #define LINUX_SIGILL 4
229 #define LINUX_SIGTRAP 5
230 #define LINUX_SIGABRT 6
231 #define LINUX_SIGIOT LINUX_SIGABRT
232 #define LINUX_SIGBUS 7
233 #define LINUX_SIGFPE 8
234 #define LINUX_SIGKILL 9
235 #define LINUX_SIGUSR1 10
236 #define LINUX_SIGSEGV 11
237 #define LINUX_SIGUSR2 12
238 #define LINUX_SIGPIPE 13
239 #define LINUX_SIGALRM 14
240 #define LINUX_SIGTERM 15
241 #define LINUX_SIGSTKFLT 16
242 #define LINUX_SIGCHLD 17
243 #define LINUX_SIGCONT 18
244 #define LINUX_SIGSTOP 19
245 #define LINUX_SIGTSTP 20
246 #define LINUX_SIGTTIN 21
247 #define LINUX_SIGTTOU 22
248 #define LINUX_SIGURG 23
249 #define LINUX_SIGXCPU 24
250 #define LINUX_SIGXFSZ 25
251 #define LINUX_SIGVTALRM 26
252 #define LINUX_SIGPROF 27
253 #define LINUX_SIGWINCH 28
254 #define LINUX_SIGIO 29
255 #define LINUX_SIGPOLL LINUX_SIGIO
256 #define LINUX_SIGPWR 30
257 #define LINUX_SIGSYS 31
259 #define LINUX_SIGTBLSZ 31
260 #define LINUX_NSIG_WORDS 2
261 #define LINUX_NBPW 32
262 #define LINUX_NSIG (LINUX_NBPW * LINUX_NSIG_WORDS)
264 /* sigaction flags */
265 #define LINUX_SA_NOCLDSTOP 0x00000001
266 #define LINUX_SA_NOCLDWAIT 0x00000002
267 #define LINUX_SA_SIGINFO 0x00000004
268 #define LINUX_SA_RESTORER 0x04000000
269 #define LINUX_SA_ONSTACK 0x08000000
270 #define LINUX_SA_RESTART 0x10000000
271 #define LINUX_SA_INTERRUPT 0x20000000
272 #define LINUX_SA_NOMASK 0x40000000
273 #define LINUX_SA_ONESHOT 0x80000000
275 /* sigprocmask actions */
276 #define LINUX_SIG_BLOCK 0
277 #define LINUX_SIG_UNBLOCK 1
278 #define LINUX_SIG_SETMASK 2
280 /* sigset_t macros */
281 #define LINUX_SIGEMPTYSET(set) (set).__bits[0] = (set).__bits[1] = 0
282 #define LINUX_SIGISMEMBER(set, sig) SIGISMEMBER(set, sig)
283 #define LINUX_SIGADDSET(set, sig) SIGADDSET(set, sig)
286 #define LINUX_MINSIGSTKSZ 2048
287 #define LINUX_SS_ONSTACK 1
288 #define LINUX_SS_DISABLE 2
290 int linux_to_bsd_sigaltstack(int lsa
);
291 int bsd_to_linux_sigaltstack(int bsa
);
293 typedef void (*l_handler_t
)(l_int
);
294 typedef l_ulong l_osigset_t
;
297 l_uint __bits
[LINUX_NSIG_WORDS
];
301 l_handler_t lsa_handler
;
302 l_osigset_t lsa_mask
;
304 void (*lsa_restorer
)(void);
308 l_handler_t lsa_handler
;
310 void (*lsa_restorer
)(void);
320 /* The Linux sigcontext, pretty much a standard 386 trapframe. */
321 struct l_sigcontext
{
339 l_int sc_esp_at_signal
;
350 struct l_sigcontext uc_mcontext
;
351 l_sigset_t uc_sigmask
;
354 #define LINUX_SI_MAX_SIZE 128
355 #define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(l_int)) - 3)
357 typedef struct l_siginfo
{
362 l_int _pad
[LINUX_SI_PAD_SIZE
];
375 l_pid_t _pid
; /* sender's pid */
376 l_uid16_t _uid
; /* sender's uid */
377 union sigval _sigval
;
381 l_pid_t _pid
; /* which child */
382 l_uid16_t _uid
; /* sender's uid */
383 l_int _status
; /* exit code */
389 void *_addr
; /* faulting insn/memory ref. */
393 l_int _band
; /* POLL_IN,POLL_OUT,POLL_MSG */
399 #define lsi_pid _sifields._kill._pid
400 #define lsi_uid _sifields._kill._uid
401 #define lsi_status _sifields._sigchld._status
402 #define lsi_utime _sifields._sigchld._utime
403 #define lsi_stime _sifields._sigchld._stime
404 #define lsi_value _sifields._rt._sigval
405 #define lsi_int _sifields._rt._sigval.sival_int
406 #define lsi_ptr _sifields._rt._sigval.sival_ptr
407 #define lsi_addr _sifields._sigfault._addr
408 #define lsi_band _sifields._sigpoll._band
409 #define lsi_fd _sifields._sigpoll._fd
412 u_int16_t significand
[4];
417 u_int16_t significand
[4];
419 u_int16_t padding
[3];
423 u_int32_t element
[4];
427 /* Regular FPU environment */
435 struct l_fpreg _st
[8];
437 u_int16_t magic
; /* 0xffff = regular FPU data */
439 /* FXSR FPU environment */
440 u_int32_t _fxsr_env
[6]; /* env is ignored */
443 struct l_fpxreg _fxsr_st
[8]; /* reg data is ignored */
444 struct l_xmmreg _xmm
[8];
445 u_int32_t padding
[56];
449 * We make the stack look like Linux expects it when calling a signal
450 * handler, but use the BSD way of calling the handler and sigreturn().
451 * This means that we need to pass the pointer to the handler too.
452 * It is appended to the frame to not interfere with the rest of it.
456 struct l_sigcontext sf_sc
;
457 struct l_fpstate sf_fpstate
;
458 l_uint sf_extramask
[LINUX_NSIG_WORDS
-1];
459 l_handler_t sf_handler
;
462 struct l_rt_sigframe
{
464 l_siginfo_t
*sf_siginfo
;
465 struct l_ucontext
*sf_ucontext
;
467 struct l_ucontext sf_sc
;
468 l_handler_t sf_handler
;
471 extern int bsd_to_linux_signal
[];
472 extern int linux_to_bsd_signal
[];
473 extern struct sysentvec linux_sysvec
;
474 extern struct sysentvec elf_linux_sysvec
;
477 * Pluggable ioctl handlers
480 extern struct ioctl_map linux_ioctl_map
;
485 #define LINUX_O_RDONLY 00
486 #define LINUX_O_WRONLY 01
487 #define LINUX_O_RDWR 02
488 #define LINUX_O_CREAT 0100
489 #define LINUX_O_EXCL 0200
490 #define LINUX_O_NOCTTY 0400
491 #define LINUX_O_TRUNC 01000
492 #define LINUX_O_APPEND 02000
493 #define LINUX_O_NONBLOCK 04000
494 #define LINUX_O_NDELAY LINUX_O_NONBLOCK
495 #define LINUX_O_SYNC 010000
496 #define LINUX_FASYNC 020000
498 #define LINUX_F_DUPFD 0
499 #define LINUX_F_GETFD 1
500 #define LINUX_F_SETFD 2
501 #define LINUX_F_GETFL 3
502 #define LINUX_F_SETFL 4
503 #define LINUX_F_GETLK 5
504 #define LINUX_F_SETLK 6
505 #define LINUX_F_SETLKW 7
506 #define LINUX_F_SETOWN 8
507 #define LINUX_F_GETOWN 9
509 #define LINUX_F_GETLK64 12
510 #define LINUX_F_SETLK64 13
511 #define LINUX_F_SETLKW64 14
513 #define LINUX_F_RDLCK 0
514 #define LINUX_F_WRLCK 1
515 #define LINUX_F_UNLCK 2
520 #define LINUX_MS_RDONLY 0x0001
521 #define LINUX_MS_NOSUID 0x0002
522 #define LINUX_MS_NODEV 0x0004
523 #define LINUX_MS_NOEXEC 0x0008
524 #define LINUX_MS_REMOUNT 0x0020
527 * SystemV IPC defines
529 #define LINUX_SEMOP 1
530 #define LINUX_SEMGET 2
531 #define LINUX_SEMCTL 3
532 #define LINUX_MSGSND 11
533 #define LINUX_MSGRCV 12
534 #define LINUX_MSGGET 13
535 #define LINUX_MSGCTL 14
536 #define LINUX_SHMAT 21
537 #define LINUX_SHMDT 22
538 #define LINUX_SHMGET 23
539 #define LINUX_SHMCTL 24
541 #define LINUX_IPC_RMID 0
542 #define LINUX_IPC_SET 1
543 #define LINUX_IPC_STAT 2
544 #define LINUX_IPC_INFO 3
546 #define LINUX_SHM_LOCK 11
547 #define LINUX_SHM_UNLOCK 12
548 #define LINUX_SHM_STAT 13
549 #define LINUX_SHM_INFO 14
551 #define LINUX_SHM_RDONLY 0x1000
552 #define LINUX_SHM_RND 0x2000
553 #define LINUX_SHM_REMAP 0x4000
555 /* semctl commands */
556 #define LINUX_GETPID 11
557 #define LINUX_GETVAL 12
558 #define LINUX_GETALL 13
559 #define LINUX_GETNCNT 14
560 #define LINUX_GETZCNT 15
561 #define LINUX_SETVAL 16
562 #define LINUX_SETALL 17
563 #define LINUX_SEM_STAT 18
564 #define LINUX_SEM_INFO 19
568 struct l_semid_ds
*buf
;
570 struct l_seminfo
*__buf
;
577 #define LINUX_SOCKET 1
579 #define LINUX_CONNECT 3
580 #define LINUX_LISTEN 4
581 #define LINUX_ACCEPT 5
582 #define LINUX_GETSOCKNAME 6
583 #define LINUX_GETPEERNAME 7
584 #define LINUX_SOCKETPAIR 8
586 #define LINUX_RECV 10
587 #define LINUX_SENDTO 11
588 #define LINUX_RECVFROM 12
589 #define LINUX_SHUTDOWN 13
590 #define LINUX_SETSOCKOPT 14
591 #define LINUX_GETSOCKOPT 15
592 #define LINUX_SENDMSG 16
593 #define LINUX_RECVMSG 17
595 #define LINUX_AF_UNSPEC 0
596 #define LINUX_AF_UNIX 1
597 #define LINUX_AF_INET 2
598 #define LINUX_AF_AX25 3
599 #define LINUX_AF_IPX 4
600 #define LINUX_AF_APPLETALK 5
602 #define LINUX_SOL_SOCKET 1
603 #define LINUX_SOL_IP 0
604 #define LINUX_SOL_IPX 256
605 #define LINUX_SOL_AX25 257
606 #define LINUX_SOL_TCP 6
607 #define LINUX_SOL_UDP 17
609 #define LINUX_SO_DEBUG 1
610 #define LINUX_SO_REUSEADDR 2
611 #define LINUX_SO_TYPE 3
612 #define LINUX_SO_ERROR 4
613 #define LINUX_SO_DONTROUTE 5
614 #define LINUX_SO_BROADCAST 6
615 #define LINUX_SO_SNDBUF 7
616 #define LINUX_SO_RCVBUF 8
617 #define LINUX_SO_KEEPALIVE 9
618 #define LINUX_SO_OOBINLINE 10
619 #define LINUX_SO_NO_CHECK 11
620 #define LINUX_SO_PRIORITY 12
621 #define LINUX_SO_LINGER 13
622 #define LINUX_SO_PEERCRED 17
623 #define LINUX_SO_RCVLOWAT 18
624 #define LINUX_SO_SNDLOWAT 19
625 #define LINUX_SO_RCVTIMEO 20
626 #define LINUX_SO_SNDTIMEO 21
627 #define LINUX_SO_TIMESTAMP 29
628 #define LINUX_SO_ACCEPTCONN 30
630 #define LINUX_IP_TOS 1
631 #define LINUX_IP_TTL 2
632 #define LINUX_IP_HDRINCL 3
633 #define LINUX_IP_OPTIONS 4
635 #define LINUX_IP_MULTICAST_IF 32
636 #define LINUX_IP_MULTICAST_TTL 33
637 #define LINUX_IP_MULTICAST_LOOP 34
638 #define LINUX_IP_ADD_MEMBERSHIP 35
639 #define LINUX_IP_DROP_MEMBERSHIP 36
655 #define LINUX_IFHWADDRLEN 6
656 #define LINUX_IFNAMSIZ 16
660 char ifrn_name
[LINUX_IFNAMSIZ
];
664 struct l_sockaddr ifru_addr
;
665 struct l_sockaddr ifru_dstaddr
;
666 struct l_sockaddr ifru_broadaddr
;
667 struct l_sockaddr ifru_netmask
;
668 struct l_sockaddr ifru_hwaddr
;
669 l_short ifru_flags
[1];
673 struct l_ifmap ifru_map
;
674 char ifru_slave
[LINUX_IFNAMSIZ
];
679 #define ifr_name ifr_ifrn.ifrn_name /* interface name */
680 #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
681 #define ifr_ifindex ifr_ifru.ifru_ivalue /* Interface index */
682 #define ifr_ifmetric ifr_ifru.ifru_metric /* Interface index */
687 #define LINUX_POLLIN 0x0001
688 #define LINUX_POLLPRI 0x0002
689 #define LINUX_POLLOUT 0x0004
690 #define LINUX_POLLERR 0x0008
691 #define LINUX_POLLHUP 0x0010
692 #define LINUX_POLLNVAL 0x0020
693 #define LINUX_POLLRDNORM 0x0040
694 #define LINUX_POLLRDBAND 0x0080
695 #define LINUX_POLLWRNORM 0x0100
696 #define LINUX_POLLWRBAND 0x0200
697 #define LINUX_POLLMSG 0x0400
711 l_uint read_exec_only
:1;
712 l_uint limit_in_pages
:1;
713 l_uint seg_not_present
:1;
717 struct l_desc_struct
{
722 #define LINUX_LOWERWORD 0x0000ffff
725 * Macros which does the same thing as those in Linux include/asm-um/ldt-i386.h.
726 * These convert Linux user space descriptor to machine one.
728 #define LINUX_LDT_entry_a(info) \
729 ((((info)->base_addr & LINUX_LOWERWORD) << 16) | \
730 ((info)->limit & LINUX_LOWERWORD))
732 #define LINUX_ENTRY_B_READ_EXEC_ONLY 9
733 #define LINUX_ENTRY_B_CONTENTS 10
734 #define LINUX_ENTRY_B_SEG_NOT_PRESENT 15
735 #define LINUX_ENTRY_B_BASE_ADDR 16
736 #define LINUX_ENTRY_B_USEABLE 20
737 #define LINUX_ENTRY_B_SEG32BIT 22
738 #define LINUX_ENTRY_B_LIMIT 23
740 #define LINUX_LDT_entry_b(info) \
741 (((info)->base_addr & 0xff000000) | \
742 ((info)->limit & 0xf0000) | \
743 ((info)->contents << LINUX_ENTRY_B_CONTENTS) | \
744 (((info)->seg_not_present == 0) << LINUX_ENTRY_B_SEG_NOT_PRESENT) | \
745 (((info)->base_addr & 0x00ff0000) >> LINUX_ENTRY_B_BASE_ADDR) | \
746 (((info)->read_exec_only == 0) << LINUX_ENTRY_B_READ_EXEC_ONLY) | \
747 ((info)->seg_32bit << LINUX_ENTRY_B_SEG32BIT) | \
748 ((info)->useable << LINUX_ENTRY_B_USEABLE) | \
749 ((info)->limit_in_pages << LINUX_ENTRY_B_LIMIT) | 0x7000)
751 #define LINUX_LDT_empty(info) \
752 ((info)->base_addr == 0 && \
753 (info)->limit == 0 && \
754 (info)->contents == 0 && \
755 (info)->seg_not_present == 1 && \
756 (info)->read_exec_only == 1 && \
757 (info)->seg_32bit == 0 && \
758 (info)->limit_in_pages == 0 && \
759 (info)->useable == 0)
762 * Macros for converting segments.
763 * They do the same as those in arch/i386/kernel/process.c in Linux.
765 #define LINUX_GET_BASE(desc) \
766 ((((desc)->a >> 16) & LINUX_LOWERWORD) | \
767 (((desc)->b << 16) & 0x00ff0000) | \
768 ((desc)->b & 0xff000000))
770 #define LINUX_GET_LIMIT(desc) \
771 (((desc)->a & LINUX_LOWERWORD) | \
772 ((desc)->b & 0xf0000))
774 #define LINUX_GET_32BIT(desc) \
775 (((desc)->b >> LINUX_ENTRY_B_SEG32BIT) & 1)
776 #define LINUX_GET_CONTENTS(desc) \
777 (((desc)->b >> LINUX_ENTRY_B_CONTENTS) & 3)
778 #define LINUX_GET_WRITABLE(desc) \
779 (((desc)->b >> LINUX_ENTRY_B_READ_EXEC_ONLY) & 1)
780 #define LINUX_GET_LIMIT_PAGES(desc) \
781 (((desc)->b >> LINUX_ENTRY_B_LIMIT) & 1)
782 #define LINUX_GET_PRESENT(desc) \
783 (((desc)->b >> LINUX_ENTRY_B_SEG_NOT_PRESENT) & 1)
784 #define LINUX_GET_USEABLE(desc) \
785 (((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1)
787 #define LINUX_CLOCK_REALTIME 0
788 #define LINUX_CLOCK_MONOTONIC 1
789 #define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
790 #define LINUX_CLOCK_THREAD_CPUTIME_ID 3
791 #define LINUX_CLOCK_REALTIME_HR 4
792 #define LINUX_CLOCK_MONOTONIC_HR 5
794 #define LINUX_CLONE_VM 0x00000100
795 #define LINUX_CLONE_FS 0x00000200
796 #define LINUX_CLONE_FILES 0x00000400
797 #define LINUX_CLONE_SIGHAND 0x00000800
798 #define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */
799 #define LINUX_CLONE_VFORK 0x00004000
800 #define LINUX_CLONE_PARENT 0x00008000
801 #define LINUX_CLONE_THREAD 0x00010000
802 #define LINUX_CLONE_SETTLS 0x00080000
803 #define LINUX_CLONE_PARENT_SETTID 0x00100000
804 #define LINUX_CLONE_CHILD_CLEARTID 0x00200000
805 #define LINUX_CLONE_CHILD_SETTID 0x01000000
807 #define LINUX_THREADING_FLAGS \
808 (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \
809 LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
811 #define LINUX_AT_FDCWD -100
812 #define LINUX_AT_SYMLINK_NOFOLLOW 0x100
813 #define LINUX_AT_REMOVEDIR 0x200
815 #define LINUX_MREMAP_MAYMOVE 1
816 #define LINUX_MREMAP_FIXED 2
818 #define LINUX_UTIME_NOW (-1)
819 #define LINUX_UTIME_OMIT (-2)
820 #endif /* !_EMULATION_LINUX_ARCH_LINUX_H_ */