[PATCH 0/3] POSIX Shared Memory Objects
Gedare Bloom
gedare at rtems.org
Tue Aug 16 20:48:01 UTC 2016
These patches start to add support for POSIX Shared Memory Objects, see
http://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html
This support aims to improve POSIX compliance.
The approach taken is to use the existing score Object as the basis
for each shm object, where the Object.Name field directly relates to
the name provided to shm_open(). So far the support for shm_open and
ftruncate have been included.
Support is needed for close() and shm_unlink().
A test is added based on some example code from an OS text book. This
test also uses mmap() and munmap() which should be added to support
mapping shared memory objects.
Gedare Bloom (3):
posix: add test case for shared memory objects
posix: shared memory support
posix: implement shm_ftruncate with workspace
cpukit/posix/Makefile.am | 3 +
cpukit/posix/include/rtems/posix/config.h | 5 +
cpukit/posix/include/rtems/posix/shm.h | 66 ++++++++
cpukit/posix/include/rtems/posix/shmimpl.h | 90 ++++++++++
cpukit/posix/preinstall.am | 8 +
cpukit/posix/src/shm.c | 48 ++++++
cpukit/posix/src/shmopen.c | 230 +++++++++++++++++++++++++-
cpukit/rtems/src/rtemsobjectgetapiclassname.c | 1 +
cpukit/sapi/include/confdefs.h | 28 ++++
cpukit/score/include/rtems/score/objectimpl.h | 5 +-
cpukit/score/include/rtems/sysinit.h | 1 +
testsuites/psxtests/Makefile.am | 4 +-
testsuites/psxtests/configure.ac | 1 +
testsuites/psxtests/psxshm01/Makefile.am | 22 +++
testsuites/psxtests/psxshm01/init.c | 91 ++++++++++
testsuites/psxtests/psxshm01/psxshm01.scn | 0
testsuites/psxtests/psxshm01/system.h | 29 ++++
testsuites/sptests/spsysinit01/init.c | 17 ++
18 files changed, 641 insertions(+), 8 deletions(-)
create mode 100644 cpukit/posix/include/rtems/posix/shm.h
create mode 100644 cpukit/posix/include/rtems/posix/shmimpl.h
create mode 100644 cpukit/posix/src/shm.c
create mode 100644 testsuites/psxtests/psxshm01/Makefile.am
create mode 100644 testsuites/psxtests/psxshm01/init.c
create mode 100644 testsuites/psxtests/psxshm01/psxshm01.scn
create mode 100644 testsuites/psxtests/psxshm01/system.h
--
1.9.1
More information about the devel
mailing list