linux_misc.c (38f1b189cd839bd8aa122ae06cc084810ca1e395) linux_misc.c (19e252baebe7a7466b33c27560420b7d95fe294d)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 Søren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD$");
32
33#include "opt_compat.h"
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 Søren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD$");
32
33#include "opt_compat.h"
34#include "opt_kdtrace.h"
34
35#include <sys/param.h>
36#include <sys/blist.h>
37#include <sys/fcntl.h>
38#if defined(__i386__)
39#include <sys/imgact_aout.h>
40#endif
41#include <sys/jail.h>

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

48#include <sys/mutex.h>
49#include <sys/namei.h>
50#include <sys/priv.h>
51#include <sys/proc.h>
52#include <sys/reboot.h>
53#include <sys/racct.h>
54#include <sys/resourcevar.h>
55#include <sys/sched.h>
35
36#include <sys/param.h>
37#include <sys/blist.h>
38#include <sys/fcntl.h>
39#if defined(__i386__)
40#include <sys/imgact_aout.h>
41#endif
42#include <sys/jail.h>

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

49#include <sys/mutex.h>
50#include <sys/namei.h>
51#include <sys/priv.h>
52#include <sys/proc.h>
53#include <sys/reboot.h>
54#include <sys/racct.h>
55#include <sys/resourcevar.h>
56#include <sys/sched.h>
57#include <sys/sdt.h>
56#include <sys/signalvar.h>
57#include <sys/stat.h>
58#include <sys/syscallsubr.h>
59#include <sys/sysctl.h>
60#include <sys/sysproto.h>
61#include <sys/systm.h>
62#include <sys/time.h>
63#include <sys/vmmeter.h>

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

78#ifdef COMPAT_LINUX32
79#include <machine/../linux32/linux.h>
80#include <machine/../linux32/linux32_proto.h>
81#else
82#include <machine/../linux/linux.h>
83#include <machine/../linux/linux_proto.h>
84#endif
85
58#include <sys/signalvar.h>
59#include <sys/stat.h>
60#include <sys/syscallsubr.h>
61#include <sys/sysctl.h>
62#include <sys/sysproto.h>
63#include <sys/systm.h>
64#include <sys/time.h>
65#include <sys/vmmeter.h>

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

80#ifdef COMPAT_LINUX32
81#include <machine/../linux32/linux.h>
82#include <machine/../linux32/linux32_proto.h>
83#else
84#include <machine/../linux/linux.h>
85#include <machine/../linux/linux_proto.h>
86#endif
87
88#include <compat/linux/linux_dtrace.h>
86#include <compat/linux/linux_file.h>
87#include <compat/linux/linux_mib.h>
88#include <compat/linux/linux_signal.h>
89#include <compat/linux/linux_util.h>
90#include <compat/linux/linux_sysproto.h>
91#include <compat/linux/linux_emul.h>
92#include <compat/linux/linux_misc.h>
93
89#include <compat/linux/linux_file.h>
90#include <compat/linux/linux_mib.h>
91#include <compat/linux/linux_signal.h>
92#include <compat/linux/linux_util.h>
93#include <compat/linux/linux_sysproto.h>
94#include <compat/linux/linux_emul.h>
95#include <compat/linux/linux_misc.h>
96
97/* DTrace init */
98LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
99
100/* Linuxulator-global DTrace probes */
101LIN_SDT_PROBE_DECLARE(locks, emul_lock, locked);
102LIN_SDT_PROBE_DECLARE(locks, emul_lock, unlock);
103LIN_SDT_PROBE_DECLARE(locks, emul_shared_rlock, locked);
104LIN_SDT_PROBE_DECLARE(locks, emul_shared_rlock, unlock);
105LIN_SDT_PROBE_DECLARE(locks, emul_shared_wlock, locked);
106LIN_SDT_PROBE_DECLARE(locks, emul_shared_wlock, unlock);
107
94int stclohz; /* Statistics clock frequency */
95
96static unsigned int linux_to_bsd_resource[LINUX_RLIM_NLIMITS] = {
97 RLIMIT_CPU, RLIMIT_FSIZE, RLIMIT_DATA, RLIMIT_STACK,
98 RLIMIT_CORE, RLIMIT_RSS, RLIMIT_NPROC, RLIMIT_NOFILE,
99 RLIMIT_MEMLOCK, RLIMIT_AS
100};
101

--- 1815 unchanged lines hidden ---
108int stclohz; /* Statistics clock frequency */
109
110static unsigned int linux_to_bsd_resource[LINUX_RLIM_NLIMITS] = {
111 RLIMIT_CPU, RLIMIT_FSIZE, RLIMIT_DATA, RLIMIT_STACK,
112 RLIMIT_CORE, RLIMIT_RSS, RLIMIT_NPROC, RLIMIT_NOFILE,
113 RLIMIT_MEMLOCK, RLIMIT_AS
114};
115

--- 1815 unchanged lines hidden ---