public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] RTEMS: Introduce <machine/_kernel_mman.h>
@ 2018-08-24 13:12 Sebastian Huber
  0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2018-08-24 13:12 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d35971f392150e1af58c105cd01313d2c619b520

commit d35971f392150e1af58c105cd01313d2c619b520
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Fri Aug 10 07:45:23 2018 +0200

    RTEMS: Introduce <machine/_kernel_mman.h>
    
    This helps to avoid Newlib updates due to FreeBSD kernel space changes.
    
    Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/sys/rtems/include/sys/mman.h | 53 +++-----------------------------
 1 file changed, 5 insertions(+), 48 deletions(-)

diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h
index 4996a66..f74f473 100644
--- a/newlib/libc/sys/rtems/include/sys/mman.h
+++ b/newlib/libc/sys/rtems/include/sys/mman.h
@@ -197,54 +197,7 @@ typedef	__size_t	size_t;
 #define	_SIZE_T_DECLARED
 #endif
 
-#if defined(_KERNEL) || defined(_WANT_FILE)
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/queue.h>
-#include <sys/rangelock.h>
-#include <vm/vm.h>
-
-struct file;
-
-struct shmfd {
-	size_t		shm_size;
-	vm_object_t	shm_object;
-	int		shm_refs;
-	uid_t		shm_uid;
-	gid_t		shm_gid;
-	mode_t		shm_mode;
-	int		shm_kmappings;
-
-	/*
-	 * Values maintained solely to make this a better-behaved file
-	 * descriptor for fstat() to run on.
-	 */
-	struct timespec	shm_atime;
-	struct timespec	shm_mtime;
-	struct timespec	shm_ctime;
-	struct timespec	shm_birthtime;
-	ino_t		shm_ino;
-
-	struct label	*shm_label;		/* MAC label */
-	const char	*shm_path;
-
-	struct rangelock shm_rl;
-	struct mtx	shm_mtx;
-};
-#endif
-
-#ifdef _KERNEL
-int	shm_map(struct file *fp, size_t size, off_t offset, void **memp);
-int	shm_unmap(struct file *fp, void *mem, size_t size);
-
-int	shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags);
-struct shmfd *shm_alloc(struct ucred *ucred, mode_t mode);
-struct shmfd *shm_hold(struct shmfd *shmfd);
-void	shm_drop(struct shmfd *shmfd);
-int	shm_dotruncate(struct shmfd *shmfd, off_t length);
-
-extern struct fileops shm_ops;
-#else /* !_KERNEL */
+#ifndef _KERNEL
 
 __BEGIN_DECLS
 /*
@@ -279,4 +232,8 @@ __END_DECLS
 
 #endif /* !_KERNEL */
 
+#ifdef _KERNEL
+/* Header file provided outside of Newlib */
+#include <machine/_kernel_mman.h>
+#endif
 #endif /* !_SYS_MMAN_H_ */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-24 13:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-24 13:12 [newlib-cygwin] RTEMS: Introduce <machine/_kernel_mman.h> Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).