public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] RTEMS: Introduce <machine/_kernel_mman.h> Date: Fri, 24 Aug 2018 13:12:00 -0000 [thread overview] Message-ID: <20180824131244.28143.qmail@sourceware.org> (raw) 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_ */
reply other threads:[~2018-08-24 13:12 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180824131244.28143.qmail@sourceware.org \ --to=sh@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).