linux.h (a7ac45761335b1d514804cd0bfe44bdb2c3a3e0c) | linux.h (4ab7403bbd76f466d482cd69035091c04e409c09) |
---|---|
1/*- 2 * Copyright (c) 2013 Dmitry Chagin 3 * Copyright (c) 1994-1996 Søren Schmidt 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * $FreeBSD$ 30 */ 31 32#ifndef _AMD64_LINUX_H_ 33#define _AMD64_LINUX_H_ 34 | 1/*- 2 * Copyright (c) 2013 Dmitry Chagin 3 * Copyright (c) 1994-1996 Søren Schmidt 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * $FreeBSD$ 30 */ 31 32#ifndef _AMD64_LINUX_H_ 33#define _AMD64_LINUX_H_ 34 |
35#include <compat/linux/linux.h> |
|
35#include <amd64/linux/linux_syscall.h> 36 37/* 38 * debugging support 39 */ 40extern u_char linux_debug_map[]; 41#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) 42#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ --- 125 unchanged lines hidden (view full) --- 168 struct l_timespec st_atim; 169 struct l_timespec st_mtim; 170 struct l_timespec st_ctim; 171 l_long __unused1; 172 l_long __unused2; 173 l_long __unused3; 174}; 175 | 36#include <amd64/linux/linux_syscall.h> 37 38/* 39 * debugging support 40 */ 41extern u_char linux_debug_map[]; 42#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) 43#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ --- 125 unchanged lines hidden (view full) --- 169 struct l_timespec st_atim; 170 struct l_timespec st_mtim; 171 struct l_timespec st_ctim; 172 l_long __unused1; 173 l_long __unused2; 174 l_long __unused3; 175}; 176 |
176/* 177 * Signalling 178 */ 179#define LINUX_SIGHUP 1 180#define LINUX_SIGINT 2 181#define LINUX_SIGQUIT 3 182#define LINUX_SIGILL 4 183#define LINUX_SIGTRAP 5 184#define LINUX_SIGABRT 6 185#define LINUX_SIGIOT LINUX_SIGABRT 186#define LINUX_SIGBUS 7 187#define LINUX_SIGFPE 8 188#define LINUX_SIGKILL 9 189#define LINUX_SIGUSR1 10 190#define LINUX_SIGSEGV 11 191#define LINUX_SIGUSR2 12 192#define LINUX_SIGPIPE 13 193#define LINUX_SIGALRM 14 194#define LINUX_SIGTERM 15 195#define LINUX_SIGSTKFLT 16 196#define LINUX_SIGCHLD 17 197#define LINUX_SIGCONT 18 198#define LINUX_SIGSTOP 19 199#define LINUX_SIGTSTP 20 200#define LINUX_SIGTTIN 21 201#define LINUX_SIGTTOU 22 202#define LINUX_SIGURG 23 203#define LINUX_SIGXCPU 24 204#define LINUX_SIGXFSZ 25 205#define LINUX_SIGVTALRM 26 206#define LINUX_SIGPROF 27 207#define LINUX_SIGWINCH 28 208#define LINUX_SIGIO 29 209#define LINUX_SIGPOLL LINUX_SIGIO 210#define LINUX_SIGPWR 30 211#define LINUX_SIGSYS 31 212#define LINUX_SIGRTMIN 32 213 214#define LINUX_SIGTBLSZ 31 215#define LINUX_NSIG 64 216#define LINUX_NBPW 64 217#define LINUX_NSIG_WORDS (LINUX_NSIG / LINUX_NBPW) 218 | |
219/* sigaction flags */ 220#define LINUX_SA_NOCLDSTOP 0x00000001 221#define LINUX_SA_NOCLDWAIT 0x00000002 222#define LINUX_SA_SIGINFO 0x00000004 223#define LINUX_SA_RESTORER 0x04000000 224#define LINUX_SA_ONSTACK 0x08000000 225#define LINUX_SA_RESTART 0x10000000 226#define LINUX_SA_INTERRUPT 0x20000000 227#define LINUX_SA_NOMASK 0x40000000 228#define LINUX_SA_ONESHOT 0x80000000 229 230/* sigprocmask actions */ 231#define LINUX_SIG_BLOCK 0 232#define LINUX_SIG_UNBLOCK 1 233#define LINUX_SIG_SETMASK 2 234 | 177/* sigaction flags */ 178#define LINUX_SA_NOCLDSTOP 0x00000001 179#define LINUX_SA_NOCLDWAIT 0x00000002 180#define LINUX_SA_SIGINFO 0x00000004 181#define LINUX_SA_RESTORER 0x04000000 182#define LINUX_SA_ONSTACK 0x08000000 183#define LINUX_SA_RESTART 0x10000000 184#define LINUX_SA_INTERRUPT 0x20000000 185#define LINUX_SA_NOMASK 0x40000000 186#define LINUX_SA_ONESHOT 0x80000000 187 188/* sigprocmask actions */ 189#define LINUX_SIG_BLOCK 0 190#define LINUX_SIG_UNBLOCK 1 191#define LINUX_SIG_SETMASK 2 192 |
235/* primitives to manipulate sigset_t */ 236 237#define LINUX_SIGEMPTYSET(set) \ 238 do { \ 239 (set).__bits[0] = 0; \ 240 } while(0) 241 242#define LINUX_SIGISMEMBER(set, sig) \ 243 (1UL & ((set).__bits[0] >> _SIG_IDX(sig))) 244 245#define LINUX_SIGADDSET(set, sig) \ 246 (set).__bits[0] |= 1UL << _SIG_IDX(sig) 247 | |
248/* sigaltstack */ 249#define LINUX_MINSIGSTKSZ 2048 | 193/* sigaltstack */ 194#define LINUX_MINSIGSTKSZ 2048 |
250#define LINUX_SS_ONSTACK 1 251#define LINUX_SS_DISABLE 2 | |
252 253typedef void (*l_handler_t)(l_int); 254 255typedef struct { | 195 196typedef void (*l_handler_t)(l_int); 197 198typedef struct { |
256 l_ulong __bits[LINUX_NSIG_WORDS]; 257} l_sigset_t; 258 259typedef struct { | |
260 l_handler_t lsa_handler; 261 l_ulong lsa_flags; 262 l_uintptr_t lsa_restorer; 263 l_sigset_t lsa_mask; 264} l_sigaction_t; 265 266typedef struct { 267 l_uintptr_t ss_sp; --- 359 unchanged lines hidden --- | 199 l_handler_t lsa_handler; 200 l_ulong lsa_flags; 201 l_uintptr_t lsa_restorer; 202 l_sigset_t lsa_mask; 203} l_sigaction_t; 204 205typedef struct { 206 l_uintptr_t ss_sp; --- 359 unchanged lines hidden --- |