View | Details | Raw Unified | Return to bug 207079 | Differences between
and this patch

Collapse All | Expand All

(-)b/include/signal.h (-1 / +2 lines)
Lines 36-41 Link Here
36
#include <sys/cdefs.h>
36
#include <sys/cdefs.h>
37
#include <sys/_types.h>
37
#include <sys/_types.h>
38
#include <sys/signal.h>
38
#include <sys/signal.h>
39
#include <machine/ucontext.h>
40
#include <sys/_ucontext.h>
39
41
40
#if __BSD_VISIBLE
42
#if __BSD_VISIBLE
41
/*
43
/*
Lines 114-120 void psignal(unsigned int, const char *); Link Here
114
116
115
#if __BSD_VISIBLE
117
#if __BSD_VISIBLE
116
int	sigblock(int);
118
int	sigblock(int);
117
struct __ucontext;		/* XXX spec requires a complete declaration. */
118
int	sigreturn(const struct __ucontext *);
119
int	sigreturn(const struct __ucontext *);
119
int	sigsetmask(int);
120
int	sigsetmask(int);
120
int	sigstack(const struct sigstack *, struct sigstack *);
121
int	sigstack(const struct sigstack *, struct sigstack *);
(-)b/sys/mips/include/ucontext.h (-5 / +5 lines)
Lines 50-62 typedef struct __mcontext { Link Here
50
	 * struct sigcontext and ucontext_t at the same time.
50
	 * struct sigcontext and ucontext_t at the same time.
51
	 */
51
	 */
52
	int		mc_onstack;	/* sigstack state to restore */
52
	int		mc_onstack;	/* sigstack state to restore */
53
	register_t	mc_pc;		/* pc at time of signal */
53
	__register_t	mc_pc;		/* pc at time of signal */
54
	register_t	mc_regs[32];	/* processor regs 0 to 31 */
54
	__register_t	mc_regs[32];	/* processor regs 0 to 31 */
55
	register_t	sr;		/* status register */
55
	__register_t	sr;		/* status register */
56
	register_t	mullo, mulhi;	/* mullo and mulhi registers... */
56
	__register_t	mullo, mulhi;	/* mullo and mulhi registers... */
57
	int		mc_fpused;	/* fp has been used */
57
	int		mc_fpused;	/* fp has been used */
58
	f_register_t	mc_fpregs[33];	/* fp regs 0 to 31 and csr */
58
	f_register_t	mc_fpregs[33];	/* fp regs 0 to 31 and csr */
59
	register_t	mc_fpc_eir;	/* fp exception instruction reg */
59
	__register_t	mc_fpc_eir;	/* fp exception instruction reg */
60
	void		*mc_tls;	/* pointer to TLS area */
60
	void		*mc_tls;	/* pointer to TLS area */
61
	int		__spare__[8];	/* XXX reserved */ 
61
	int		__spare__[8];	/* XXX reserved */ 
62
} mcontext_t;
62
} mcontext_t;
(-)b/sys/powerpc/include/ucontext.h (-5 / +5 lines)
Lines 42-52 typedef struct __mcontext { Link Here
42
#define _MC_AV_VALID	0x02
42
#define _MC_AV_VALID	0x02
43
	int		mc_onstack;	  	/* saved onstack flag */
43
	int		mc_onstack;	  	/* saved onstack flag */
44
	int		mc_len;			/* sizeof(__mcontext) */
44
	int		mc_len;			/* sizeof(__mcontext) */
45
	uint64_t	mc_avec[32*2];		/* vector register file */
45
	__uint64_t	mc_avec[32*2];		/* vector register file */
46
	uint32_t	mc_av[2];
46
	__uint32_t	mc_av[2];
47
	register_t	mc_frame[42];
47
	__register_t	mc_frame[42];
48
	uint64_t	mc_fpreg[33];
48
	__uint64_t	mc_fpreg[33];
49
	uint64_t	mc_vsxfpreg[32];	/* low-order half of VSR0-31 */
49
	__uint64_t	mc_vsxfpreg[32];	/* low-order half of VSR0-31 */
50
} mcontext_t __aligned(16);
50
} mcontext_t __aligned(16);
51
51
52
#if defined(_KERNEL) && defined(__powerpc64__)
52
#if defined(_KERNEL) && defined(__powerpc64__)
(-)b/sys/sparc64/include/ucontext.h (-5 / +5 lines)
Lines 33-43 Link Here
33
#define	_MACHINE_UCONTEXT_H_
33
#define	_MACHINE_UCONTEXT_H_
34
34
35
struct __mcontext {
35
struct __mcontext {
36
	uint64_t mc_global[8];
36
	__uint64_t mc_global[8];
37
	uint64_t mc_out[8];
37
	__uint64_t mc_out[8];
38
	uint64_t mc_local[8];
38
	__uint64_t mc_local[8];
39
	uint64_t mc_in[8];
39
	__uint64_t mc_in[8];
40
	uint32_t mc_fp[64];
40
	__uint32_t mc_fp[64];
41
} __aligned(64);
41
} __aligned(64);
42
42
43
typedef struct __mcontext mcontext_t;
43
typedef struct __mcontext mcontext_t;
(-)b/sys/sys/_ucontext.h (+52 lines)
Added Link Here
1
/*-
2
 * Copyright (c) 1999 Marcel Moolenaar
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
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.
16
 *
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.
27
 *
28
 * $FreeBSD$
29
 */
30
31
#ifndef _SYS__UCONTEXT_H_
32
#define	_SYS__UCONTEXT_H_
33
34
typedef struct __ucontext {
35
	/*
36
	 * Keep the order of the first two fields. Also,
37
	 * keep them the first two fields in the structure.
38
	 * This way we can have a union with struct
39
	 * sigcontext and ucontext_t. This allows us to
40
	 * support them both at the same time.
41
	 * note: the union is not defined, though.
42
	 */
43
	__sigset_t	uc_sigmask;
44
	mcontext_t	uc_mcontext;
45
46
	struct __ucontext *uc_link;
47
	struct __stack_t uc_stack;
48
	int		uc_flags;
49
	int		__spare__[4];
50
} ucontext_t;
51
52
#endif /* _SYS__UCONTEXT_H */
(-)b/sys/sys/signal.h (-10 / +13 lines)
Lines 354-371 typedef void __siginfohandler_t(int, struct __siginfo *, void *); Link Here
354
#endif
354
#endif
355
355
356
#if __XSI_VISIBLE
356
#if __XSI_VISIBLE
357
/*
358
 * Structure used in sigaltstack call.
359
 */
360
#if __BSD_VISIBLE
357
#if __BSD_VISIBLE
361
typedef	struct sigaltstack {
358
#define	__stack_t sigaltstack
362
#else
363
typedef	struct {
364
#endif
359
#endif
365
	void	*ss_sp;			/* signal stack base */
360
typedef	struct __stack_t stack_t;
366
	__size_t ss_size;		/* signal stack length */
367
	int	ss_flags;		/* SS_DISABLE and/or SS_ONSTACK */
368
} stack_t;
369
361
370
#define	SS_ONSTACK	0x0001	/* take signal on alternate stack */
362
#define	SS_ONSTACK	0x0001	/* take signal on alternate stack */
371
#define	SS_DISABLE	0x0004	/* disable taking signals on alternate stack */
363
#define	SS_DISABLE	0x0004	/* disable taking signals on alternate stack */
Lines 373-378 typedef struct { Link Here
373
#define	SIGSTKSZ	(MINSIGSTKSZ + 32768)	/* recommended stack size */
365
#define	SIGSTKSZ	(MINSIGSTKSZ + 32768)	/* recommended stack size */
374
#endif
366
#endif
375
367
368
/*
369
 * Structure used in sigaltstack call.  Its definition is always
370
 * needed for __ucontext.  If __BSD_VISIBLE is defined, the structure
371
 * tag is actually sigaltstack.
372
 */
373
struct __stack_t {
374
	void	*ss_sp;			/* signal stack base */
375
	__size_t ss_size;		/* signal stack length */
376
	int	ss_flags;		/* SS_DISABLE and/or SS_ONSTACK */
377
};
378
376
#if __BSD_VISIBLE
379
#if __BSD_VISIBLE
377
/*
380
/*
378
 * 4.3 compatibility:
381
 * 4.3 compatibility:
(-)b/sys/sys/ucontext.h (-17 / +1 lines)
Lines 33-57 Link Here
33
33
34
#include <sys/signal.h>
34
#include <sys/signal.h>
35
#include <machine/ucontext.h>
35
#include <machine/ucontext.h>
36
#include <sys/_ucontext.h>
36
37
37
typedef struct __ucontext {
38
	/*
39
	 * Keep the order of the first two fields. Also,
40
	 * keep them the first two fields in the structure.
41
	 * This way we can have a union with struct
42
	 * sigcontext and ucontext_t. This allows us to
43
	 * support them both at the same time.
44
	 * note: the union is not defined, though.
45
	 */
46
	sigset_t	uc_sigmask;
47
	mcontext_t	uc_mcontext;
48
49
	struct __ucontext *uc_link;
50
	stack_t		uc_stack;
51
	int		uc_flags;
52
#define	UCF_SWAPPED	0x00000001	/* Used by swapcontext(3). */
38
#define	UCF_SWAPPED	0x00000001	/* Used by swapcontext(3). */
53
	int		__spare__[4];
54
} ucontext_t;
55
39
56
#if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
40
#if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
57
#if defined(__i386__)
41
#if defined(__i386__)
(-)b/sys/x86/include/ucontext.h (+5 lines)
Lines 162-165 typedef struct __mcontext { Link Here
162
} mcontext_t;
162
} mcontext_t;
163
#endif /* __amd64__ */
163
#endif /* __amd64__ */
164
164
165
#ifdef __LINT__
166
typedef struct __mcontext {
167
} mcontext_t;
168
#endif /* __LINT__ */
169
165
#endif /* !_X86_UCONTEXT_H_ */
170
#endif /* !_X86_UCONTEXT_H_ */

Return to bug 207079