Deleted Added
full compact
freebsd32_misc.c (174377) freebsd32_misc.c (174380)
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 174377 2007-12-06 23:11:27Z jhb $");
28__FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 174380 2007-12-06 23:23:16Z jhb $");
29
30#include "opt_compat.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/bus.h>
35#include <sys/clock.h>
36#include <sys/exec.h>

--- 43 unchanged lines hidden (view full) ---

80#include <vm/vm_map.h>
81#include <vm/vm_object.h>
82#include <vm/vm_extern.h>
83
84#include <machine/cpu.h>
85
86#include <compat/freebsd32/freebsd32_util.h>
87#include <compat/freebsd32/freebsd32.h>
29
30#include "opt_compat.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/bus.h>
35#include <sys/clock.h>
36#include <sys/exec.h>

--- 43 unchanged lines hidden (view full) ---

80#include <vm/vm_map.h>
81#include <vm/vm_object.h>
82#include <vm/vm_extern.h>
83
84#include <machine/cpu.h>
85
86#include <compat/freebsd32/freebsd32_util.h>
87#include <compat/freebsd32/freebsd32.h>
88#include <compat/freebsd32/freebsd32_ipc.h>
88#include <compat/freebsd32/freebsd32_signal.h>
89#include <compat/freebsd32/freebsd32_proto.h>
90
91CTASSERT(sizeof(struct timeval32) == 8);
92CTASSERT(sizeof(struct timespec32) == 8);
93CTASSERT(sizeof(struct itimerval32) == 16);
94CTASSERT(sizeof(struct statfs32) == 256);
95CTASSERT(sizeof(struct rusage32) == 72);

--- 1322 unchanged lines hidden (view full) ---

1418 return (freebsd32_shmctl(td, &ap));
1419 }
1420 case 1: /* oshmctl */
1421 default:
1422 return (EINVAL);
1423 }
1424}
1425
89#include <compat/freebsd32/freebsd32_signal.h>
90#include <compat/freebsd32/freebsd32_proto.h>
91
92CTASSERT(sizeof(struct timeval32) == 8);
93CTASSERT(sizeof(struct timespec32) == 8);
94CTASSERT(sizeof(struct itimerval32) == 16);
95CTASSERT(sizeof(struct statfs32) == 256);
96CTASSERT(sizeof(struct rusage32) == 72);

--- 1322 unchanged lines hidden (view full) ---

1419 return (freebsd32_shmctl(td, &ap));
1420 }
1421 case 1: /* oshmctl */
1422 default:
1423 return (EINVAL);
1424 }
1425}
1426
1426struct ipc_perm32 {
1427 uint16_t cuid;
1428 uint16_t cgid;
1429 uint16_t uid;
1430 uint16_t gid;
1431 uint16_t mode;
1432 uint16_t seq;
1433 uint32_t key;
1434};
1435struct shmid_ds32 {
1436 struct ipc_perm32 shm_perm;
1437 int32_t shm_segsz;
1438 int32_t shm_lpid;
1439 int32_t shm_cpid;
1440 int16_t shm_nattch;
1441 int32_t shm_atime;
1442 int32_t shm_dtime;
1443 int32_t shm_ctime;
1444 uint32_t shm_internal;
1445};
1446struct shm_info32 {
1447 int32_t used_ids;
1448 uint32_t shm_tot;
1449 uint32_t shm_rss;
1450 uint32_t shm_swp;
1451 uint32_t swap_attempts;
1452 uint32_t swap_successes;
1453};
1454struct shminfo32 {
1455 uint32_t shmmax;
1456 uint32_t shmmin;
1457 uint32_t shmmni;
1458 uint32_t shmseg;
1459 uint32_t shmall;
1460};
1461
1462int
1463freebsd32_shmctl(struct thread *td, struct freebsd32_shmctl_args *uap)
1464{
1465 int error = 0;
1466 union {
1467 struct shmid_ds shmid_ds;
1468 struct shm_info shm_info;
1469 struct shminfo shminfo;

--- 893 unchanged lines hidden ---
1427int
1428freebsd32_shmctl(struct thread *td, struct freebsd32_shmctl_args *uap)
1429{
1430 int error = 0;
1431 union {
1432 struct shmid_ds shmid_ds;
1433 struct shm_info shm_info;
1434 struct shminfo shminfo;

--- 893 unchanged lines hidden ---