freebsd32_misc.c (254356) | freebsd32_misc.c (254490) |
---|---|
1/*- 2 * Copyright (c) 2002 Doug Rabson 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Doug Rabson 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 254356 2013-08-15 07:54:31Z glebius $"); | 28__FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 254490 2013-08-18 13:34:11Z pjd $"); |
29 30#include "opt_compat.h" 31#include "opt_inet.h" 32#include "opt_inet6.h" 33 34#define __ELF_WORD_SIZE 32 35 36#include <sys/param.h> --- 60 unchanged lines hidden (view full) --- 97#include <machine/cpu.h> 98#include <machine/elf.h> 99 100#include <security/audit/audit.h> 101 102#include <compat/freebsd32/freebsd32_util.h> 103#include <compat/freebsd32/freebsd32.h> 104#include <compat/freebsd32/freebsd32_ipc.h> | 29 30#include "opt_compat.h" 31#include "opt_inet.h" 32#include "opt_inet6.h" 33 34#define __ELF_WORD_SIZE 32 35 36#include <sys/param.h> --- 60 unchanged lines hidden (view full) --- 97#include <machine/cpu.h> 98#include <machine/elf.h> 99 100#include <security/audit/audit.h> 101 102#include <compat/freebsd32/freebsd32_util.h> 103#include <compat/freebsd32/freebsd32.h> 104#include <compat/freebsd32/freebsd32_ipc.h> |
105#include <compat/freebsd32/freebsd32_misc.h> |
|
105#include <compat/freebsd32/freebsd32_signal.h> 106#include <compat/freebsd32/freebsd32_proto.h> 107 108FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); 109 110#ifndef __mips__ 111CTASSERT(sizeof(struct timeval32) == 8); 112CTASSERT(sizeof(struct timespec32) == 8); --- 10 unchanged lines hidden (view full) --- 123#ifndef __mips__ 124CTASSERT(sizeof(struct stat32) == 96); 125#endif 126CTASSERT(sizeof(struct sigaction32) == 24); 127 128static int freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count); 129static int freebsd32_kevent_copyin(void *arg, struct kevent *kevp, int count); 130 | 106#include <compat/freebsd32/freebsd32_signal.h> 107#include <compat/freebsd32/freebsd32_proto.h> 108 109FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); 110 111#ifndef __mips__ 112CTASSERT(sizeof(struct timeval32) == 8); 113CTASSERT(sizeof(struct timespec32) == 8); --- 10 unchanged lines hidden (view full) --- 124#ifndef __mips__ 125CTASSERT(sizeof(struct stat32) == 96); 126#endif 127CTASSERT(sizeof(struct sigaction32) == 24); 128 129static int freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count); 130static int freebsd32_kevent_copyin(void *arg, struct kevent *kevp, int count); 131 |
131#if BYTE_ORDER == BIG_ENDIAN 132#define PAIR32TO64(type, name) ((name ## 2) | ((type)(name ## 1) << 32)) 133#define RETVAL_HI 0 134#define RETVAL_LO 1 135#else 136#define PAIR32TO64(type, name) ((name ## 1) | ((type)(name ## 2) << 32)) 137#define RETVAL_HI 1 138#define RETVAL_LO 0 139#endif 140 | |
141void 142freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32) 143{ 144 145 TV_CP(*s, *s32, ru_utime); 146 TV_CP(*s, *s32, ru_stime); 147 CP(*s, *s32, ru_maxrss); 148 CP(*s, *s32, ru_ixrss); --- 2862 unchanged lines hidden --- | 132void 133freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32) 134{ 135 136 TV_CP(*s, *s32, ru_utime); 137 TV_CP(*s, *s32, ru_stime); 138 CP(*s, *s32, ru_maxrss); 139 CP(*s, *s32, ru_ixrss); --- 2862 unchanged lines hidden --- |