Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
96c935cb
Commit
96c935cb
authored
Oct 15, 2002
by
Stephen Rothwell
Committed by
David S. Miller
Oct 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Move over to generic siginfo.
parent
db091d18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
144 deletions
+27
-144
include/asm-generic/siginfo.h
include/asm-generic/siginfo.h
+23
-5
include/asm-sparc/siginfo.h
include/asm-sparc/siginfo.h
+2
-69
include/asm-sparc64/siginfo.h
include/asm-sparc64/siginfo.h
+2
-70
No files found.
include/asm-generic/siginfo.h
View file @
96c935cb
...
...
@@ -8,9 +8,21 @@ typedef union sigval {
void
*
sival_ptr
;
}
sigval_t
;
/*
* This is the size (including padding) of the part of the
* struct siginfo that is before the union.
*/
#ifndef __ARCH_SI_PREAMBLE_SIZE
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
#endif
#define SI_MAX_SIZE 128
#ifndef SI_PAD_SIZE
#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3)
#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
#endif
#ifndef __ARCH_SI_UID_T
#define __ARCH_SI_UID_T uid_t
#endif
#ifndef HAVE_ARCH_SIGINFO_T
...
...
@@ -26,7 +38,7 @@ typedef struct siginfo {
/* kill() */
struct
{
pid_t
_pid
;
/* sender's pid */
uid_t
_uid
;
/* sender's uid */
__ARCH_SI_UID_T
_uid
;
/* sender's uid */
}
_kill
;
/* POSIX.1b timers */
...
...
@@ -38,14 +50,14 @@ typedef struct siginfo {
/* POSIX.1b signals */
struct
{
pid_t
_pid
;
/* sender's pid */
uid_t
_uid
;
/* sender's uid */
__ARCH_SI_UID_T
_uid
;
/* sender's uid */
sigval_t
_sigval
;
}
_rt
;
/* SIGCHLD */
struct
{
pid_t
_pid
;
/* which child */
uid_t
_uid
;
/* sender's uid */
__ARCH_SI_UID_T
_uid
;
/* sender's uid */
int
_status
;
/* exit code */
clock_t
_utime
;
clock_t
_stime
;
...
...
@@ -54,6 +66,9 @@ typedef struct siginfo {
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
struct
{
void
*
_addr
;
/* faulting insn/memory ref. */
#ifdef __ARCH_SI_TRAPNO
int
_trapno
;
/* TRAP # which caused the signal */
#endif
}
_sigfault
;
/* SIGPOLL */
...
...
@@ -80,6 +95,9 @@ typedef struct siginfo {
#define si_int _sifields._rt._sigval.sival_int
#define si_ptr _sifields._rt._sigval.sival_ptr
#define si_addr _sifields._sigfault._addr
#ifdef __ARCH_SI_TRAPNO
#define si_trapno _sifields._sigfault._trapno
#endif
#define si_band _sifields._sigpoll._band
#define si_fd _sifields._sigpoll._fd
...
...
@@ -244,7 +262,7 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
memcpy
(
to
,
from
,
sizeof
(
*
to
));
else
/* _sigchld is currently the largest know union member */
memcpy
(
to
,
from
,
3
*
sizeof
(
int
)
+
sizeof
(
from
->
_sifields
.
_sigchld
));
memcpy
(
to
,
from
,
__ARCH_SI_PREAMBLE_SIZE
+
sizeof
(
from
->
_sifields
.
_sigchld
));
}
#endif
...
...
include/asm-sparc/siginfo.h
View file @
96c935cb
...
...
@@ -5,64 +5,12 @@
#ifndef _SPARC_SIGINFO_H
#define _SPARC_SIGINFO_H
#define
HAVE_ARCH_SIGINFO_T
#define
HAVE_ARCH_COPY_SIGINF
O
#define
__ARCH_SI_UID_T unsigned int
#define
__ARCH_SI_TRAPN
O
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h>
typedef
struct
siginfo
{
int
si_signo
;
int
si_errno
;
int
si_code
;
union
{
int
_pad
[
SI_PAD_SIZE
];
/* kill() */
struct
{
pid_t
_pid
;
/* sender's pid */
unsigned
int
_uid
;
/* sender's uid */
}
_kill
;
/* POSIX.1b timers */
struct
{
unsigned
int
_timer1
;
unsigned
int
_timer2
;
}
_timer
;
/* POSIX.1b signals */
struct
{
pid_t
_pid
;
/* sender's pid */
unsigned
int
_uid
;
/* sender's uid */
sigval_t
_sigval
;
}
_rt
;
/* SIGCHLD */
struct
{
pid_t
_pid
;
/* which child */
unsigned
int
_uid
;
/* sender's uid */
int
_status
;
/* exit code */
clock_t
_utime
;
clock_t
_stime
;
}
_sigchld
;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
struct
{
void
*
_addr
;
/* faulting insn/memory ref. */
int
_trapno
;
/* TRAP # which caused the signal */
}
_sigfault
;
/* SIGPOLL */
struct
{
int
_band
;
/* POLL_IN, POLL_OUT, POLL_MSG */
int
_fd
;
}
_sigpoll
;
}
_sifields
;
}
siginfo_t
;
#define si_trapno _sifields._sigfault._trapno
#define SI_NOINFO 32767
/* no information in siginfo_t */
/*
...
...
@@ -71,19 +19,4 @@ typedef struct siginfo {
#define EMT_TAGOVF (__SI_FAULT|1)
/* tag overflow */
#define NSIGEMT 1
#ifdef __KERNEL__
#include <linux/string.h>
extern
inline
void
copy_siginfo
(
siginfo_t
*
to
,
siginfo_t
*
from
)
{
if
(
from
->
si_code
<
0
)
*
to
=
*
from
;
else
/* _sigchld is currently the largest know union member */
memcpy
(
to
,
from
,
3
*
sizeof
(
int
)
+
sizeof
(
from
->
_sifields
.
_sigchld
));
}
#endif
/* __KERNEL__ */
#endif
/* !(_SPARC_SIGINFO_H) */
include/asm-sparc64/siginfo.h
View file @
96c935cb
#ifndef _SPARC64_SIGINFO_H
#define _SPARC64_SIGINFO_H
#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4)
#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
#define
HAVE_ARCH_SIGINFO_T
#define
HAVE_ARCH_COPY_SIGINF
O
#define
__ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define
__ARCH_SI_TRAPN
O
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h>
...
...
@@ -20,60 +19,6 @@ typedef union sigval32 {
u32
sival_ptr
;
}
sigval_t32
;
#endif
/* __KERNEL__ */
typedef
struct
siginfo
{
int
si_signo
;
int
si_errno
;
int
si_code
;
union
{
int
_pad
[
SI_PAD_SIZE
];
/* kill() */
struct
{
pid_t
_pid
;
/* sender's pid */
uid_t
_uid
;
/* sender's uid */
}
_kill
;
/* POSIX.1b timers */
struct
{
unsigned
int
_timer1
;
unsigned
int
_timer2
;
}
_timer
;
/* POSIX.1b signals */
struct
{
pid_t
_pid
;
/* sender's pid */
uid_t
_uid
;
/* sender's uid */
sigval_t
_sigval
;
}
_rt
;
/* SIGCHLD */
struct
{
pid_t
_pid
;
/* which child */
uid_t
_uid
;
/* sender's uid */
int
_status
;
/* exit code */
clock_t
_utime
;
clock_t
_stime
;
}
_sigchld
;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
struct
{
void
*
_addr
;
/* faulting insn/memory ref. */
int
_trapno
;
/* TRAP # which caused the signal */
}
_sigfault
;
/* SIGPOLL */
struct
{
long
_band
;
/* POLL_IN, POLL_OUT, POLL_MSG */
int
_fd
;
}
_sigpoll
;
}
_sifields
;
}
siginfo_t
;
#ifdef __KERNEL__
typedef
struct
siginfo32
{
int
si_signo
;
int
si_errno
;
...
...
@@ -126,8 +71,6 @@ typedef struct siginfo32 {
#endif
/* __KERNEL__ */
#define si_trapno _sifields._sigfault._trapno
#define SI_NOINFO 32767
/* no information in siginfo_t */
/*
...
...
@@ -152,17 +95,6 @@ typedef struct sigevent32 {
}
_sigev_un
;
}
sigevent_t32
;
#include <linux/string.h>
static
inline
void
copy_siginfo
(
siginfo_t
*
to
,
siginfo_t
*
from
)
{
if
(
from
->
si_code
<
0
)
*
to
=
*
from
;
else
/* _sigchld is currently the largest know union member */
memcpy
(
to
,
from
,
4
*
sizeof
(
int
)
+
sizeof
(
from
->
_sifields
.
_sigchld
));
}
extern
int
copy_siginfo_to_user32
(
siginfo_t32
*
to
,
siginfo_t
*
from
);
#endif
/* __KERNEL__ */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment