[Midnightbsd-cvs] src [12353] trunk/sys/sys/shm.h: sync with FreeBSD 11-stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Feb 9 12:50:44 EST 2020
Revision: 12353
http://svnweb.midnightbsd.org/src/?rev=12353
Author: laffer1
Date: 2020-02-09 12:50:44 -0500 (Sun, 09 Feb 2020)
Log Message:
-----------
sync with FreeBSD 11-stable
Modified Paths:
--------------
trunk/sys/sys/shm.h
Modified: trunk/sys/sys/shm.h
===================================================================
--- trunk/sys/sys/shm.h 2020-02-09 17:50:31 UTC (rev 12352)
+++ trunk/sys/sys/shm.h 2020-02-09 17:50:44 UTC (rev 12353)
@@ -1,5 +1,5 @@
/* $MidnightBSD$ */
-/* $FreeBSD: stable/10/sys/sys/shm.h 328294 2018-01-23 18:22:41Z jhb $ */
+/* $FreeBSD: stable/11/sys/sys/shm.h 347995 2019-05-20 16:31:45Z kib $ */
/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
/*-
@@ -41,11 +41,17 @@
#define _SYS_SHM_H_
#include <sys/cdefs.h>
+#ifdef _WANT_SYSVSHM_INTERNALS
+#define _WANT_SYSVIPC_INTERNALS
+#endif
#include <sys/ipc.h>
#include <sys/_types.h>
+#include <machine/param.h>
+
#define SHM_RDONLY 010000 /* Attach read-only (else read-write) */
#define SHM_RND 020000 /* Round attach address to SHMLBA */
+#define SHM_REMAP 030000 /* Unmap before mapping */
#define SHMLBA PAGE_SIZE /* Segment low boundary address multiple */
/* "official" access mode definitions; somewhat braindead since you have
@@ -102,9 +108,7 @@
time_t shm_ctime; /* time of last change by shmctl() */
};
-#ifdef _KERNEL
-#include <vm/vm.h>
-
+#if defined(_KERNEL) || defined(_WANT_SYSVSHM_INTERNALS)
/*
* System 5 style catch-all structure for shared memory constants that
* might be of interest to user programs. Do we really want/need this?
@@ -117,6 +121,8 @@
u_long shmall; /* max amount of shared memory (pages) */
};
+struct vm_object;
+
/*
* Add a kernel wrapper to the shmid_ds struct so that private info (like the
* MAC label) can be added to it, without changing the user interface.
@@ -123,13 +129,12 @@
*/
struct shmid_kernel {
struct shmid_ds u;
- vm_object_t object;
+ struct vm_object *object;
struct label *label; /* MAC label */
struct ucred *cred; /* creator's credendials */
};
+#endif
-extern struct shminfo shminfo;
-
struct shm_info {
int used_ids;
unsigned long shm_tot;
@@ -139,12 +144,15 @@
unsigned long swap_successes;
};
-struct thread;
+#ifdef _KERNEL
struct proc;
struct vmspace;
+extern struct shminfo shminfo;
+
void shmexit(struct vmspace *);
void shmfork(struct proc *, struct proc *);
+
#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -164,6 +172,6 @@
int shmdt(const void *);
__END_DECLS
-#endif /* !_KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SHM_H_ */
More information about the Midnightbsd-cvs
mailing list