summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxshm02/system.h
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2016-08-12 15:25:10 -0400
committerGedare Bloom <gedare@rtems.org>2017-01-13 11:17:30 -0500
commitba77628250ae7158db363fc0d7886ebd43e9cb69 (patch)
tree91a8a5b7d20399c69c5c88223a43ec681451996b /testsuites/psxtests/psxshm02/system.h
parentposix: fix typo in mmap arguments (diff)
downloadrtems-ba77628250ae7158db363fc0d7886ebd43e9cb69.tar.bz2
posix: shared memory support
Add POSIX shared memory manager (Shm). Includes a hook-based approach for the backing memory storage that defaults to the Workspace, and a test is provided using the heap. A test is also provided for the basic use of mmap'ing a shared memory object. This test currently fails at the mmap stage due to no support for mmap.
Diffstat (limited to 'testsuites/psxtests/psxshm02/system.h')
-rw-r--r--testsuites/psxtests/psxshm02/system.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxshm02/system.h b/testsuites/psxtests/psxshm02/system.h
new file mode 100644
index 0000000000..d02c87f62c
--- /dev/null
+++ b/testsuites/psxtests/psxshm02/system.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2016 Gedare Bloom.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <pmacros.h>
+#include <unistd.h>
+#include <errno.h>
+
+void *POSIX_Init(
+ void *argument
+);
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10
+#define CONFIGURE_MAXIMUM_POSIX_SHMS 1
+#define CONFIGURE_MEMORY_OVERHEAD 10
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#include <rtems/posix/shm.h>
+const POSIX_Shm_Object_operations _POSIX_Shm_Object_operations = {
+ _POSIX_Shm_Object_create_from_heap,
+ _POSIX_Shm_Object_resize_from_heap,
+ _POSIX_Shm_Object_delete_from_heap,
+ _POSIX_Shm_Object_read_from_heap
+};
+#define CONFIGURE_HAS_OWN_POSIX_SHM_OBJECT_OPERATIONS
+
+#include <rtems/confdefs.h>