Merge remote-tracking branch 'asoc/topic/ac97' into asoc-fsl
[deliverable/linux.git] / arch / mips / include / uapi / asm / siginfo.h
CommitLineData
61730c53
DH
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGINFO_H
10#define _UAPI_ASM_SIGINFO_H
11
12
13#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int))
70342287 14#undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
61730c53
DH
15
16#define HAVE_ARCH_SIGINFO_T
17
18/*
19 * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
20 * by design ...
21 */
22#define HAVE_ARCH_COPY_SIGINFO
23struct siginfo;
24
25/*
26 * Careful to keep union _sifields from shifting ...
27 */
1d3e2d79 28#if _MIPS_SZLONG == 32
61730c53 29#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
1d3e2d79 30#elif _MIPS_SZLONG == 64
61730c53 31#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
1d3e2d79
MR
32#else
33#error _MIPS_SZLONG neither 32 nor 64
61730c53
DH
34#endif
35
36#include <asm-generic/siginfo.h>
37
38typedef struct siginfo {
39 int si_signo;
40 int si_code;
41 int si_errno;
42 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
43
44 union {
45 int _pad[SI_PAD_SIZE];
46
47 /* kill() */
48 struct {
49 pid_t _pid; /* sender's pid */
50 __ARCH_SI_UID_T _uid; /* sender's uid */
51 } _kill;
52
53 /* POSIX.1b timers */
54 struct {
55 timer_t _tid; /* timer id */
56 int _overrun; /* overrun count */
57 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
58 sigval_t _sigval; /* same as below */
70342287 59 int _sys_private; /* not to be passed to user */
61730c53
DH
60 } _timer;
61
62 /* POSIX.1b signals */
63 struct {
64 pid_t _pid; /* sender's pid */
65 __ARCH_SI_UID_T _uid; /* sender's uid */
66 sigval_t _sigval;
67 } _rt;
68
69 /* SIGCHLD */
70 struct {
71 pid_t _pid; /* which child */
72 __ARCH_SI_UID_T _uid; /* sender's uid */
73 int _status; /* exit code */
74 clock_t _utime;
75 clock_t _stime;
76 } _sigchld;
77
78 /* IRIX SIGCHLD */
79 struct {
80 pid_t _pid; /* which child */
81 clock_t _utime;
82 int _status; /* exit code */
83 clock_t _stime;
84 } _irix_sigchld;
85
86 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
87 struct {
88 void __user *_addr; /* faulting insn/memory ref. */
89#ifdef __ARCH_SI_TRAPNO
90 int _trapno; /* TRAP # which caused the signal */
91#endif
92 short _addr_lsb;
93 } _sigfault;
94
70342287 95 /* SIGPOLL, SIGXFSZ (To do ...) */
61730c53 96 struct {
70342287 97 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
61730c53
DH
98 int _fd;
99 } _sigpoll;
100 } _sifields;
101} siginfo_t;
102
103/*
104 * si_code values
105 * Again these have been chosen to be IRIX compatible.
106 */
107#undef SI_ASYNCIO
108#undef SI_TIMER
109#undef SI_MESGQ
110#define SI_ASYNCIO -2 /* sent by AIO completion */
111#define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */
112#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */
113
114
115#endif /* _UAPI_ASM_SIGINFO_H */
This page took 0.064374 seconds and 5 git commands to generate.