summaryrefslogtreecommitdiffstats
path: root/spec/rtems/sem
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-06 13:52:29 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-10 09:51:00 +0100
commite9d9a6ac52f5afd20ae4ff024fea0e6b1de45467 (patch)
treed2ee9358759bbccc0be663300d08937c88e9b03e /spec/rtems/sem
parentgenerate_membench.py: New script (diff)
downloadrtems-central-e9d9a6ac52f5afd20ae4ff024fea0e6b1de45467.tar.bz2
spec: Add memory benchmarks
Diffstat (limited to 'spec/rtems/sem')
-rw-r--r--spec/rtems/sem/req/mem-obt-rel-del.yml17
-rw-r--r--spec/rtems/sem/req/mem-obt-rel.yml17
-rw-r--r--spec/rtems/sem/val/mem-obt-rel-del.yml59
-rw-r--r--spec/rtems/sem/val/mem-obt-rel.yml57
4 files changed, 150 insertions, 0 deletions
diff --git a/spec/rtems/sem/req/mem-obt-rel-del.yml b/spec/rtems/sem/req/mem-obt-rel-del.yml
new file mode 100644
index 00000000..e997aff4
--- /dev/null
+++ b/spec/rtems/sem/req/mem-obt-rel-del.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: ../../req/mem-basic
+non-functional-type: quality
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The system shall provide a benchmark program to show the static memory usage
+ of a basic application configuration with ${/acfg/if/max-semaphores:/name}
+ defined to one and calls to ${../if/create:/name}, ${../if/obtain:/name},
+ ${../if/release:/name}, and ${../if/delete:/name}.
+type: requirement
diff --git a/spec/rtems/sem/req/mem-obt-rel.yml b/spec/rtems/sem/req/mem-obt-rel.yml
new file mode 100644
index 00000000..1224b32c
--- /dev/null
+++ b/spec/rtems/sem/req/mem-obt-rel.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: ../../req/mem-basic
+non-functional-type: quality
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The system shall provide a benchmark program to show the static memory usage
+ of a basic application configuration with ${/acfg/if/max-semaphores:/name}
+ defined to one and calls to ${../if/create:/name}, ${../if/obtain:/name}, and
+ ${../if/release:/name}.
+type: requirement
diff --git a/spec/rtems/sem/val/mem-obt-rel-del.yml b/spec/rtems/sem/val/mem-obt-rel-del.yml
new file mode 100644
index 00000000..3efc7db9
--- /dev/null
+++ b/spec/rtems/sem/val/mem-obt-rel-del.yml
@@ -0,0 +1,59 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: validation
+ uid: ../req/mem-obt-rel-del
+test-brief: |
+ This static memory usage benchmark program facilitates a basic application
+ configuration with ${/acfg/if/max-semaphores:/name} defined to one and calls
+ to ${../if/create:/name}, ${../if/obtain:/name}, ${../if/release:/name}, and
+ ${../if/delete:/name}.
+test-code: |
+ static void Init( rtems_task_argument arg )
+ {
+ (void) arg;
+
+ (void) rtems_semaphore_create( 0, 0, 0, 0, NULL );
+ (void) rtems_semaphore_obtain( 0, 0, 0 );
+ (void) rtems_semaphore_release( 0 );
+ (void) rtems_semaphore_delete( 0 );
+ }
+
+ #define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+ #define TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
+
+ #define TASK_STORAGE_SIZE \
+ RTEMS_TASK_STORAGE_SIZE( \
+ RTEMS_MINIMUM_STACK_SIZE, \
+ TASK_ATTRIBUTES )
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+ #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+ #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+ #define CONFIGURE_MAXIMUM_TASKS 1
+
+ #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+ #define CONFIGURE_INIT_TASK_ATTRIBUTES TASK_ATTRIBUTES
+
+ #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
+
+ #define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE TASK_STORAGE_SIZE
+
+ #define CONFIGURE_INIT
+
+ #include <rtems/confdefs.h>
+test-description: null
+test-includes:
+- rtems.h
+test-local-includes: []
+test-target: testsuites/membench/mem-sem-obt-rel-del.c
+type: test-suite
diff --git a/spec/rtems/sem/val/mem-obt-rel.yml b/spec/rtems/sem/val/mem-obt-rel.yml
new file mode 100644
index 00000000..96ec4734
--- /dev/null
+++ b/spec/rtems/sem/val/mem-obt-rel.yml
@@ -0,0 +1,57 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: validation
+ uid: ../req/mem-obt-rel
+test-brief: |
+ This static memory usage benchmark program facilitates a basic application
+ configuration with ${/acfg/if/max-semaphores:/name} defined to one and calls
+ to ${../if/create:/name}, ${../if/obtain:/name}, and ${../if/release:/name}.
+test-code: |
+ static void Init( rtems_task_argument arg )
+ {
+ (void) arg;
+
+ (void) rtems_semaphore_create( 0, 0, 0, 0, NULL );
+ (void) rtems_semaphore_obtain( 0, 0, 0 );
+ (void) rtems_semaphore_release( 0 );
+ }
+
+ #define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+ #define TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
+
+ #define TASK_STORAGE_SIZE \
+ RTEMS_TASK_STORAGE_SIZE( \
+ RTEMS_MINIMUM_STACK_SIZE, \
+ TASK_ATTRIBUTES )
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+ #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+ #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+ #define CONFIGURE_MAXIMUM_TASKS 1
+
+ #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+ #define CONFIGURE_INIT_TASK_ATTRIBUTES TASK_ATTRIBUTES
+
+ #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
+
+ #define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE TASK_STORAGE_SIZE
+
+ #define CONFIGURE_INIT
+
+ #include <rtems/confdefs.h>
+test-description: null
+test-includes:
+- rtems.h
+test-local-includes: []
+test-target: testsuites/membench/mem-sem-obt-rel.c
+type: test-suite