File indexing completed on 2025-01-18 10:13:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef __VKI_X86_LINUX_H
0030 #define __VKI_X86_LINUX_H
0031
0032
0033 #define VKI_LITTLE_ENDIAN 1
0034
0035
0036
0037
0038
0039 typedef unsigned char __vki_u8;
0040
0041 typedef __signed__ short __vki_s16;
0042 typedef unsigned short __vki_u16;
0043
0044 typedef __signed__ int __vki_s32;
0045 typedef unsigned int __vki_u32;
0046
0047 typedef __signed__ long long __vki_s64;
0048 typedef unsigned long long __vki_u64;
0049
0050 typedef unsigned short vki_u16;
0051
0052 typedef unsigned int vki_u32;
0053
0054
0055
0056
0057
0058
0059 #define VKI_PAGE_SHIFT 12
0060 #define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
0061 #define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
0062 #define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
0063
0064
0065
0066
0067
0068 #define VKI_SHMLBA VKI_PAGE_SIZE
0069
0070
0071
0072
0073
0074 #define VKI_MINSIGSTKSZ 2048
0075
0076 #define VKI_SIG_BLOCK 0
0077 #define VKI_SIG_UNBLOCK 1
0078 #define VKI_SIG_SETMASK 2
0079
0080
0081 typedef void __vki_signalfn_t(int);
0082 typedef __vki_signalfn_t __user *__vki_sighandler_t;
0083
0084 typedef void __vki_restorefn_t(void);
0085 typedef __vki_restorefn_t __user *__vki_sigrestore_t;
0086
0087 #define VKI_SIG_DFL ((__vki_sighandler_t)0)
0088 #define VKI_SIG_IGN ((__vki_sighandler_t)1)
0089
0090 #define _VKI_NSIG 64
0091 #define _VKI_NSIG_BPW 32
0092 #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
0093
0094 typedef unsigned long vki_old_sigset_t;
0095
0096 typedef struct {
0097 unsigned long sig[_VKI_NSIG_WORDS];
0098 } vki_sigset_t;
0099
0100 #define VKI_SIGHUP 1
0101 #define VKI_SIGINT 2
0102 #define VKI_SIGQUIT 3
0103 #define VKI_SIGILL 4
0104 #define VKI_SIGTRAP 5
0105 #define VKI_SIGABRT 6
0106
0107 #define VKI_SIGBUS 7
0108 #define VKI_SIGFPE 8
0109 #define VKI_SIGKILL 9
0110 #define VKI_SIGUSR1 10
0111 #define VKI_SIGSEGV 11
0112 #define VKI_SIGUSR2 12
0113 #define VKI_SIGPIPE 13
0114 #define VKI_SIGALRM 14
0115 #define VKI_SIGTERM 15
0116 #define VKI_SIGSTKFLT 16
0117 #define VKI_SIGCHLD 17
0118 #define VKI_SIGCONT 18
0119 #define VKI_SIGSTOP 19
0120 #define VKI_SIGTSTP 20
0121 #define VKI_SIGTTIN 21
0122 #define VKI_SIGTTOU 22
0123 #define VKI_SIGURG 23
0124 #define VKI_SIGXCPU 24
0125 #define VKI_SIGXFSZ 25
0126 #define VKI_SIGVTALRM 26
0127 #define VKI_SIGPROF 27
0128 #define VKI_SIGWINCH 28
0129 #define VKI_SIGIO 29
0130 #define VKI_SIGPWR 30
0131 #define VKI_SIGSYS 31
0132 #define VKI_SIGUNUSED 31
0133
0134
0135 #define VKI_SIGRTMIN 32
0136
0137 #define VKI_SIGRTMAX _VKI_NSIG
0138
0139 #define VKI_SA_NOCLDSTOP 0x00000001u
0140 #define VKI_SA_NOCLDWAIT 0x00000002u
0141 #define VKI_SA_SIGINFO 0x00000004u
0142 #define VKI_SA_ONSTACK 0x08000000u
0143 #define VKI_SA_RESTART 0x10000000u
0144 #define VKI_SA_NODEFER 0x40000000u
0145 #define VKI_SA_RESETHAND 0x80000000u
0146
0147 #define VKI_SA_NOMASK VKI_SA_NODEFER
0148 #define VKI_SA_ONESHOT VKI_SA_RESETHAND
0149
0150
0151 #define VKI_SA_RESTORER 0x04000000
0152
0153 #define VKI_SS_ONSTACK 1
0154 #define VKI_SS_DISABLE 2
0155
0156
0157
0158
0159
0160 struct vki_old_sigaction {
0161
0162
0163
0164
0165 __vki_sighandler_t ksa_handler;
0166 vki_old_sigset_t sa_mask;
0167 unsigned long sa_flags;
0168 __vki_sigrestore_t sa_restorer;
0169 };
0170
0171 struct vki_sigaction_base {
0172
0173 __vki_sighandler_t ksa_handler;
0174 unsigned long sa_flags;
0175 __vki_sigrestore_t sa_restorer;
0176 vki_sigset_t sa_mask;
0177 };
0178
0179
0180
0181 typedef struct vki_sigaction_base vki_sigaction_toK_t;
0182 typedef struct vki_sigaction_base vki_sigaction_fromK_t;
0183
0184
0185 typedef struct vki_sigaltstack {
0186 void __user *ss_sp;
0187 int ss_flags;
0188 vki_size_t ss_size;
0189 } vki_stack_t;
0190
0191
0192
0193
0194
0195 struct _vki_fpreg {
0196 unsigned short significand[4];
0197 unsigned short exponent;
0198 };
0199
0200 struct _vki_fpxreg {
0201 unsigned short significand[4];
0202 unsigned short exponent;
0203 unsigned short padding[3];
0204 };
0205
0206 struct _vki_xmmreg {
0207 unsigned long element[4];
0208 };
0209
0210 struct _vki_fpstate {
0211
0212 unsigned long cw;
0213 unsigned long sw;
0214 unsigned long tag;
0215 unsigned long ipoff;
0216 unsigned long cssel;
0217 unsigned long dataoff;
0218 unsigned long datasel;
0219 struct _vki_fpreg _st[8];
0220 unsigned short status;
0221 unsigned short magic;
0222
0223
0224 unsigned long _fxsr_env[6];
0225 unsigned long mxcsr;
0226 unsigned long reserved;
0227 struct _vki_fpxreg _fxsr_st[8];
0228 struct _vki_xmmreg _xmm[8];
0229 unsigned long padding[56];
0230 };
0231
0232 struct vki_sigcontext {
0233 unsigned short gs, __gsh;
0234 unsigned short fs, __fsh;
0235 unsigned short es, __esh;
0236 unsigned short ds, __dsh;
0237 unsigned long edi;
0238 unsigned long esi;
0239 unsigned long ebp;
0240 unsigned long esp;
0241 unsigned long ebx;
0242 unsigned long edx;
0243 unsigned long ecx;
0244 unsigned long eax;
0245 unsigned long trapno;
0246 unsigned long err;
0247 unsigned long eip;
0248 unsigned short cs, __csh;
0249 unsigned long eflags;
0250 unsigned long esp_at_signal;
0251 unsigned short ss, __ssh;
0252 struct _vki_fpstate __user * fpstate;
0253 unsigned long oldmask;
0254 unsigned long cr2;
0255 };
0256
0257
0258
0259
0260
0261 #define VKI_PROT_NONE 0x0
0262 #define VKI_PROT_READ 0x1
0263 #define VKI_PROT_WRITE 0x2
0264 #define VKI_PROT_EXEC 0x4
0265 #define VKI_PROT_GROWSDOWN 0x01000000
0266 #define VKI_PROT_GROWSUP 0x02000000
0267
0268 #define VKI_MAP_SHARED 0x01
0269 #define VKI_MAP_PRIVATE 0x02
0270
0271 #define VKI_MAP_FIXED 0x10
0272 #define VKI_MAP_ANONYMOUS 0x20
0273 #define VKI_MAP_NORESERVE 0x4000
0274
0275
0276
0277
0278
0279 #define VKI_O_ACCMODE 03
0280 #define VKI_O_RDONLY 00
0281 #define VKI_O_WRONLY 01
0282 #define VKI_O_RDWR 02
0283 #define VKI_O_CREAT 0100
0284 #define VKI_O_EXCL 0200
0285 #define VKI_O_TRUNC 01000
0286 #define VKI_O_APPEND 02000
0287 #define VKI_O_NONBLOCK 04000
0288 #define VKI_O_LARGEFILE 0100000
0289
0290 #define VKI_AT_FDCWD -100
0291
0292 #define VKI_F_DUPFD 0
0293 #define VKI_F_GETFD 1
0294 #define VKI_F_SETFD 2
0295 #define VKI_F_GETFL 3
0296 #define VKI_F_SETFL 4
0297 #define VKI_F_GETLK 5
0298 #define VKI_F_SETLK 6
0299 #define VKI_F_SETLKW 7
0300
0301 #define VKI_F_SETOWN 8
0302 #define VKI_F_GETOWN 9
0303 #define VKI_F_SETSIG 10
0304 #define VKI_F_GETSIG 11
0305
0306 #define VKI_F_GETLK64 12
0307 #define VKI_F_SETLK64 13
0308 #define VKI_F_SETLKW64 14
0309
0310 #define VKI_F_SETOWN_EX 15
0311 #define VKI_F_GETOWN_EX 16
0312
0313 #define VKI_F_OFD_GETLK 36
0314 #define VKI_F_OFD_SETLK 37
0315 #define VKI_F_OFD_SETLKW 38
0316
0317 #define VKI_F_OWNER_TID 0
0318 #define VKI_F_OWNER_PID 1
0319 #define VKI_F_OWNER_PGRP 2
0320
0321 struct vki_f_owner_ex {
0322 int type;
0323 __vki_kernel_pid_t pid;
0324 };
0325
0326
0327 #define VKI_FD_CLOEXEC 1
0328
0329 #define VKI_F_LINUX_SPECIFIC_BASE 1024
0330
0331
0332
0333
0334
0335 #define VKI_RLIMIT_DATA 2
0336 #define VKI_RLIMIT_STACK 3
0337 #define VKI_RLIMIT_CORE 4
0338 #define VKI_RLIMIT_NOFILE 7
0339
0340
0341
0342
0343
0344 #define VKI_SOL_SOCKET 1
0345
0346 #define VKI_SO_TYPE 3
0347
0348 #define VKI_SO_ATTACH_FILTER 26
0349
0350
0351
0352
0353
0354 #define VKI_SIOCSPGRP 0x8902
0355 #define VKI_SIOCGPGRP 0x8904
0356 #define VKI_SIOCATMARK 0x8905
0357 #define VKI_SIOCGSTAMP 0x8906
0358 #define VKI_SIOCGSTAMPNS 0x8907
0359
0360
0361
0362
0363
0364 struct vki_stat {
0365 unsigned long st_dev;
0366 unsigned long st_ino;
0367 unsigned short st_mode;
0368 unsigned short st_nlink;
0369 unsigned short st_uid;
0370 unsigned short st_gid;
0371 unsigned long st_rdev;
0372 unsigned long st_size;
0373 unsigned long st_blksize;
0374 unsigned long st_blocks;
0375 unsigned long st_atime;
0376 unsigned long st_atime_nsec;
0377 unsigned long st_mtime;
0378 unsigned long st_mtime_nsec;
0379 unsigned long st_ctime;
0380 unsigned long st_ctime_nsec;
0381 unsigned long __unused4;
0382 unsigned long __unused5;
0383 };
0384
0385 struct vki_stat64 {
0386 unsigned long long st_dev;
0387 unsigned char __pad0[4];
0388
0389 #define STAT64_HAS_BROKEN_ST_INO 1
0390 unsigned long __st_ino;
0391
0392 unsigned int st_mode;
0393 unsigned int st_nlink;
0394
0395 unsigned long st_uid;
0396 unsigned long st_gid;
0397
0398 unsigned long long st_rdev;
0399 unsigned char __pad3[4];
0400
0401 long long st_size;
0402 unsigned long st_blksize;
0403
0404 unsigned long st_blocks;
0405 unsigned long __pad4;
0406
0407 unsigned long st_atime;
0408 unsigned long st_atime_nsec;
0409
0410 unsigned long st_mtime;
0411 unsigned int st_mtime_nsec;
0412
0413 unsigned long st_ctime;
0414 unsigned long st_ctime_nsec;
0415
0416 unsigned long long st_ino;
0417 };
0418
0419
0420
0421
0422
0423
0424 struct vki_statfs {
0425 __vki_u32 f_type;
0426 __vki_u32 f_bsize;
0427 __vki_u32 f_blocks;
0428 __vki_u32 f_bfree;
0429 __vki_u32 f_bavail;
0430 __vki_u32 f_files;
0431 __vki_u32 f_ffree;
0432 __vki_kernel_fsid_t f_fsid;
0433 __vki_u32 f_namelen;
0434 __vki_u32 f_frsize;
0435 __vki_u32 f_spare[5];
0436 };
0437
0438
0439
0440
0441
0442 struct vki_winsize {
0443 unsigned short ws_row;
0444 unsigned short ws_col;
0445 unsigned short ws_xpixel;
0446 unsigned short ws_ypixel;
0447 };
0448
0449 #define VKI_NCC 8
0450 struct vki_termio {
0451 unsigned short c_iflag;
0452 unsigned short c_oflag;
0453 unsigned short c_cflag;
0454 unsigned short c_lflag;
0455 unsigned char c_line;
0456 unsigned char c_cc[VKI_NCC];
0457 };
0458
0459
0460
0461
0462
0463
0464 typedef unsigned char vki_cc_t;
0465 typedef unsigned int vki_tcflag_t;
0466
0467 #define VKI_NCCS 19
0468 struct vki_termios {
0469 vki_tcflag_t c_iflag;
0470 vki_tcflag_t c_oflag;
0471 vki_tcflag_t c_cflag;
0472 vki_tcflag_t c_lflag;
0473 vki_cc_t c_line;
0474 vki_cc_t c_cc[VKI_NCCS];
0475 };
0476
0477
0478
0479
0480
0481 #define _VKI_IOC_NRBITS 8
0482 #define _VKI_IOC_TYPEBITS 8
0483 #define _VKI_IOC_SIZEBITS 14
0484 #define _VKI_IOC_DIRBITS 2
0485
0486 #define _VKI_IOC_NRMASK ((1 << _VKI_IOC_NRBITS)-1)
0487 #define _VKI_IOC_TYPEMASK ((1 << _VKI_IOC_TYPEBITS)-1)
0488 #define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1)
0489 #define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1)
0490
0491 #define _VKI_IOC_NRSHIFT 0
0492 #define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS)
0493 #define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS)
0494 #define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS)
0495
0496 #define _VKI_IOC_NONE 0U
0497 #define _VKI_IOC_WRITE 1U
0498 #define _VKI_IOC_READ 2U
0499
0500 #define _VKI_IOC(dir,type,nr,size) \
0501 (((dir) << _VKI_IOC_DIRSHIFT) | \
0502 ((type) << _VKI_IOC_TYPESHIFT) | \
0503 ((nr) << _VKI_IOC_NRSHIFT) | \
0504 ((size) << _VKI_IOC_SIZESHIFT))
0505
0506
0507 #define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0)
0508 #define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
0509 #define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
0510 #define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
0511
0512
0513 #define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK)
0514 #define _VKI_IOC_TYPE(nr) (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK)
0515 #define _VKI_IOC_NR(nr) (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK)
0516 #define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK)
0517
0518
0519
0520
0521
0522 #define VKI_TCGETS 0x5401
0523 #define VKI_TCSETS 0x5402
0524 #define VKI_TCSETSW 0x5403
0525 #define VKI_TCSETSF 0x5404
0526 #define VKI_TCGETA 0x5405
0527 #define VKI_TCSETA 0x5406
0528 #define VKI_TCSETAW 0x5407
0529 #define VKI_TCSETAF 0x5408
0530 #define VKI_TCSBRK 0x5409
0531 #define VKI_TCXONC 0x540A
0532 #define VKI_TCFLSH 0x540B
0533 #define VKI_TIOCSCTTY 0x540E
0534 #define VKI_TIOCGPGRP 0x540F
0535 #define VKI_TIOCSPGRP 0x5410
0536 #define VKI_TIOCOUTQ 0x5411
0537 #define VKI_TIOCGWINSZ 0x5413
0538 #define VKI_TIOCSWINSZ 0x5414
0539 #define VKI_TIOCMGET 0x5415
0540 #define VKI_TIOCMBIS 0x5416
0541 #define VKI_TIOCMBIC 0x5417
0542 #define VKI_TIOCMSET 0x5418
0543 #define VKI_FIONREAD 0x541B
0544 #define VKI_TIOCLINUX 0x541C
0545 #define VKI_FIONBIO 0x5421
0546 #define VKI_TIOCNOTTY 0x5422
0547 #define VKI_TCSBRKP 0x5425
0548 #define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int)
0549 #define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int)
0550
0551 #define VKI_FIONCLEX 0x5450
0552 #define VKI_FIOCLEX 0x5451
0553 #define VKI_FIOASYNC 0x5452
0554 #define VKI_TIOCSERGETLSR 0x5459
0555
0556 #define VKI_TIOCGICOUNT 0x545D
0557
0558
0559
0560
0561
0562
0563 #define VKI_POLLIN 0x0001
0564
0565 struct vki_pollfd {
0566 int fd;
0567 short events;
0568 short revents;
0569 };
0570
0571
0572
0573
0574
0575 struct vki_user_i387_struct {
0576 long cwd;
0577 long swd;
0578 long twd;
0579 long fip;
0580 long fcs;
0581 long foo;
0582 long fos;
0583 long st_space[20];
0584 };
0585
0586 struct vki_user_fxsr_struct {
0587 unsigned short cwd;
0588 unsigned short swd;
0589 unsigned short twd;
0590 unsigned short fop;
0591 long fip;
0592 long fcs;
0593 long foo;
0594 long fos;
0595 long mxcsr;
0596 long reserved;
0597 long st_space[32];
0598 long xmm_space[32];
0599 long padding[56];
0600 };
0601
0602
0603
0604
0605
0606
0607
0608 struct vki_user_regs_struct {
0609 long ebx, ecx, edx, esi, edi, ebp, eax;
0610 unsigned short ds, __ds, es, __es;
0611 unsigned short fs, __fs, gs, __gs;
0612 long orig_eax, eip;
0613 unsigned short cs, __cs;
0614 long eflags, esp;
0615 unsigned short ss, __ss;
0616 };
0617
0618
0619
0620
0621
0622 typedef unsigned long vki_elf_greg_t;
0623
0624 #define VKI_ELF_NGREG (sizeof (struct vki_user_regs_struct) / sizeof(vki_elf_greg_t))
0625 typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG];
0626
0627 typedef struct vki_user_i387_struct vki_elf_fpregset_t;
0628 typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;
0629
0630 #define VKI_AT_SYSINFO 32
0631
0632
0633
0634
0635
0636 struct vki_ucontext {
0637 unsigned long uc_flags;
0638 struct vki_ucontext *uc_link;
0639 vki_stack_t uc_stack;
0640 struct vki_sigcontext uc_mcontext;
0641 vki_sigset_t uc_sigmask;
0642 };
0643
0644
0645
0646
0647
0648 #define VKI_GDT_ENTRY_TLS_ENTRIES 3
0649 #define VKI_GDT_ENTRY_TLS_MIN 6
0650 #define VKI_GDT_ENTRY_TLS_MAX (VKI_GDT_ENTRY_TLS_MIN + VKI_GDT_ENTRY_TLS_ENTRIES - 1)
0651
0652
0653
0654
0655
0656
0657
0658
0659
0660 struct vki_user_desc {
0661 unsigned int entry_number;
0662 unsigned long base_addr;
0663 unsigned int limit;
0664 unsigned int seg_32bit:1;
0665 unsigned int contents:2;
0666 unsigned int read_exec_only:1;
0667 unsigned int limit_in_pages:1;
0668 unsigned int seg_not_present:1;
0669 unsigned int useable:1;
0670
0671
0672
0673
0674
0675 unsigned int reserved:25;
0676 };
0677
0678
0679 typedef struct vki_user_desc vki_modify_ldt_t;
0680
0681
0682
0683
0684
0685 struct vki_ipc64_perm
0686 {
0687 __vki_kernel_key_t key;
0688 __vki_kernel_uid32_t uid;
0689 __vki_kernel_gid32_t gid;
0690 __vki_kernel_uid32_t cuid;
0691 __vki_kernel_gid32_t cgid;
0692 __vki_kernel_mode_t mode;
0693 unsigned short __pad1;
0694 unsigned short seq;
0695 unsigned short __pad2;
0696 unsigned long __unused1;
0697 unsigned long __unused2;
0698 };
0699
0700
0701
0702
0703
0704 struct vki_semid64_ds {
0705 struct vki_ipc64_perm sem_perm;
0706 __vki_kernel_time_t sem_otime;
0707 unsigned long __unused1;
0708 __vki_kernel_time_t sem_ctime;
0709 unsigned long __unused2;
0710 unsigned long sem_nsems;
0711 unsigned long __unused3;
0712 unsigned long __unused4;
0713 };
0714
0715
0716
0717
0718
0719 struct vki_msqid64_ds {
0720 struct vki_ipc64_perm msg_perm;
0721 __vki_kernel_time_t msg_stime;
0722 unsigned long __unused1;
0723 __vki_kernel_time_t msg_rtime;
0724 unsigned long __unused2;
0725 __vki_kernel_time_t msg_ctime;
0726 unsigned long __unused3;
0727 unsigned long msg_cbytes;
0728 unsigned long msg_qnum;
0729 unsigned long msg_qbytes;
0730 __vki_kernel_pid_t msg_lspid;
0731 __vki_kernel_pid_t msg_lrpid;
0732 unsigned long __unused4;
0733 unsigned long __unused5;
0734 };
0735
0736
0737
0738
0739
0740 struct vki_ipc_kludge {
0741 struct vki_msgbuf __user *msgp;
0742 long msgtyp;
0743 };
0744
0745 #define VKI_SEMOP 1
0746 #define VKI_SEMGET 2
0747 #define VKI_SEMCTL 3
0748 #define VKI_SEMTIMEDOP 4
0749 #define VKI_MSGSND 11
0750 #define VKI_MSGRCV 12
0751 #define VKI_MSGGET 13
0752 #define VKI_MSGCTL 14
0753 #define VKI_SHMAT 21
0754 #define VKI_SHMDT 22
0755 #define VKI_SHMGET 23
0756 #define VKI_SHMCTL 24
0757
0758
0759
0760
0761
0762
0763 struct vki_shmid64_ds {
0764 struct vki_ipc64_perm shm_perm;
0765 vki_size_t shm_segsz;
0766 __vki_kernel_time_t shm_atime;
0767 unsigned long __unused1;
0768 __vki_kernel_time_t shm_dtime;
0769 unsigned long __unused2;
0770 __vki_kernel_time_t shm_ctime;
0771 unsigned long __unused3;
0772 __vki_kernel_pid_t shm_cpid;
0773 __vki_kernel_pid_t shm_lpid;
0774 unsigned long shm_nattch;
0775 unsigned long __unused4;
0776 unsigned long __unused5;
0777 };
0778
0779 struct vki_shminfo64 {
0780 unsigned long shmmax;
0781 unsigned long shmmin;
0782 unsigned long shmmni;
0783 unsigned long shmseg;
0784 unsigned long shmall;
0785 unsigned long __unused1;
0786 unsigned long __unused2;
0787 unsigned long __unused3;
0788 unsigned long __unused4;
0789 };
0790
0791
0792
0793
0794
0795
0796
0797
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815
0816
0817 #define VKI_PTRACE_GETREGS 12
0818 #define VKI_PTRACE_SETREGS 13
0819 #define VKI_PTRACE_GETFPREGS 14
0820 #define VKI_PTRACE_SETFPREGS 15
0821 #define VKI_PTRACE_GETFPXREGS 18
0822 #define VKI_PTRACE_SETFPXREGS 19
0823 #define VKI_PTRACE_GET_THREAD_AREA 25
0824 #define VKI_PTRACE_SET_THREAD_AREA 26
0825
0826
0827
0828
0829
0830 #define VKI_VM86_PLUS_INSTALL_CHECK 0
0831 #define VKI_VM86_ENTER 1
0832 #define VKI_VM86_ENTER_NO_BYPASS 2
0833 #define VKI_VM86_REQUEST_IRQ 3
0834 #define VKI_VM86_FREE_IRQ 4
0835 #define VKI_VM86_GET_IRQ_BITS 5
0836 #define VKI_VM86_GET_AND_RESET_IRQ 6
0837
0838 struct vki_vm86_regs {
0839
0840
0841
0842 long ebx;
0843 long ecx;
0844 long edx;
0845 long esi;
0846 long edi;
0847 long ebp;
0848 long eax;
0849 long __null_ds;
0850 long __null_es;
0851 long __null_fs;
0852 long __null_gs;
0853 long orig_eax;
0854 long eip;
0855 unsigned short cs, __csh;
0856 long eflags;
0857 long esp;
0858 unsigned short ss, __ssh;
0859
0860
0861
0862 unsigned short es, __esh;
0863 unsigned short ds, __dsh;
0864 unsigned short fs, __fsh;
0865 unsigned short gs, __gsh;
0866 };
0867
0868 struct vki_revectored_struct {
0869 unsigned long __map[8];
0870 };
0871
0872 struct vki_vm86_struct {
0873 struct vki_vm86_regs regs;
0874 unsigned long flags;
0875 unsigned long screen_bitmap;
0876 unsigned long cpu_type;
0877 struct vki_revectored_struct int_revectored;
0878 struct vki_revectored_struct int21_revectored;
0879 };
0880
0881 struct vki_vm86plus_info_struct {
0882 unsigned long force_return_for_pic:1;
0883 unsigned long vm86dbg_active:1;
0884 unsigned long vm86dbg_TFpendig:1;
0885 unsigned long unused:28;
0886 unsigned long is_vm86pus:1;
0887 unsigned char vm86dbg_intxxtab[32];
0888 };
0889
0890 struct vki_vm86plus_struct {
0891 struct vki_vm86_regs regs;
0892 unsigned long flags;
0893 unsigned long screen_bitmap;
0894 unsigned long cpu_type;
0895 struct vki_revectored_struct int_revectored;
0896 struct vki_revectored_struct int21_revectored;
0897 struct vki_vm86plus_info_struct vm86plus;
0898 };
0899
0900
0901
0902
0903
0904 #define VKI_ENOSYS 38
0905 #define VKI_EOVERFLOW 75
0906
0907
0908
0909
0910
0911 #define VKI_TIOCGSERIAL 0x541E
0912 #define VKI_TIOCSSERIAL 0x541F
0913
0914
0915
0916
0917
0918 #endif
0919
0920
0921
0922