Chris, Gedate.. please fill in gaps.
On 11/21/2014 4:06 AM, Thomas Kim wrote:
Dear Joel,
I am sorry. please let me know how to download these patch
codes(source code, makefile.am http://makefile.am, pre-install.am
http://pre-install.am, etc) for mmap implementation.
At this time, I am modified makefile.am http://makefile.am for
integrating mmp source code in gsoc2011-rtems-mmu-support-project.
but, I was failed in building process.
Gedare should really comment since he mentored that. I took
the sys/mman.h from one of Chris' projects. But I can't
find it this morning.
I recall the GSoC project ended up working on MMU framework
and some target support. There was a lot of infrastructure work
to begin to think about mmap().
Chris has an implementation of some of the capabilities but I don't
recall which git repo. I thought about merging that code but it
doesn't have tests, documentation or confdefs.h support so just
brought over the header and added stubs.
Please advise me.
Best Regards.
Thomas Kim
2014-11-20 11:37 GMT+09:00 Joel Sherrill joel.sherr...@oarcorp.com
mailto:joel.sherr...@oarcorp.com:
On November 19, 2014 8:31:46 PM CST, Gedare Bloom
ged...@rtems.org mailto:ged...@rtems.org wrote:
OK great
I have an updated version of the patch. Something wasn't right
with the mskefile that showed up later. Not sure how it built
before. :(
On Wed, Nov 19, 2014 at 5:04 PM, Joel Sherrill
joel.sherr...@oarcorp.com mailto:joel.sherr...@oarcorp.com wrote:
On 11/19/2014 2:55 PM, Gedare Bloom wrote:
Is this the same one that Chris has had in use before? (I
think that
is who had one in use..)
Yes. You wanted it in rtems to avoid me having to add a
prototype to
a file
to avoid a warning.
I didn't integrate his implementation but only his .h file and
stubs.
His
implementation will need the addition of tests and code in
confdefs.h.
--joel
-Gedare
On Wed, Nov 19, 2014 at 2:59 PM, Joel Sherrill
joel.sherr...@oarcorp.com mailto:joel.sherr...@oarcorp.com
wrote:
* Makefile.am updated and preinstall.am
http://preinstall.am regenerated.
* mprotect.c had a prototype removed now that we have
mman.h
* mmap.c, munmap.c: New stub files.
---
cpukit/posix/Makefile.am| 5 ++
cpukit/posix/include/sys/mman.h | 189
cpukit/posix/preinstall.am http://preinstall.am | 9 ++
cpukit/posix/src/mmap.c | 26 ++
cpukit/posix/src/mprotect.c | 10 +--
cpukit/posix/src/munmap.c | 30 +++
6 files changed, 261 insertions(+), 8 deletions(-)
create mode 100644 cpukit/posix/include/sys/mman.h
create mode 100644 cpukit/posix/src/mmap.c
create mode 100644 cpukit/posix/src/munmap.c
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 346b65a..b3be07c 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -21,6 +21,9 @@ include_rtems_posix_HEADERS +=
include/rtems/posix/keyimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/config.h
include_rtems_posix_HEADERS += include/rtems/posix/posixapi.h
+include_sysdir = $(includedir)/sys
+include_sys_HEADERS = include/sys/mman.h
+
if HAS_PTHREADS
# include
include_HEADERS = include/aio.h
@@ -91,7 +94,9 @@ libposix_a_SOURCES += src/cond.c
src/condattrdestroy.c \
src/condtimedwait.c src/condwait.c src/condwaitsupp.c
src/condget.c
## MEMORY_C_FILES
+libposix_a_SOURCES += src/mmap.c
libposix_a_SOURCES += src/mprotect.c
+libposix_a_SOURCES += src/munmap.c
## MESSAGE_QUEUE_C_FILES
libposix_a_SOURCES += src/mqueue.c src/mqueueclose.c \
diff --git a/cpukit/posix/include/sys/mman.h
b/cpukit/posix/include/sys/mman.h
new file mode 100644
index 000..ddf34cc
--- /dev/null
+++ b/cpukit/posix/include/sys/mman.h
@@ -0,0 +1,189 @@
+/* $NetBSD: mman.h,v 1.36 2005/09/13 01:42:51 christos Exp $
*/
+
+/*-
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights
reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
without
+ * modification, are permitted provided that the following
conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above
copyright
+ *notice, this list of conditions and the following
disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
copyright
+ *notice, this list of conditions and the following
disclaimer
in