[rtems-central commit] generate_membench.py: Add task create workaround

Sebastian Huber sebh at rtems.org
Thu Sep 30 11:00:29 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    2f48804c69a31be611f6464f660f80e0dc312166
Changeset: http://git.rtems.org/rtems-central/commit/?id=2f48804c69a31be611f6464f660f80e0dc312166

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Sep 30 13:02:15 2021 +0200

generate_membench.py: Add task create workaround

---

 generate_membench.py                  | 17 ++++++++++++++++-
 spec/rtems/timer/val/mem-srv-init.yml | 15 +++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/generate_membench.py b/generate_membench.py
index ccd0c3c..beacf0b 100755
--- a/generate_membench.py
+++ b/generate_membench.py
@@ -643,7 +643,22 @@ ${../if/create:/name} and ${../if/delete:/name}""",
 ${../if/initiate-server:/name}""",
         None,
         "(void) rtems_timer_initiate_server( 0, 0, 0 );",
-        _CONFIG_DEFAULT),
+        """static void *task_stack_allocate( size_t size )
+{
+  (void) size;
+  return NULL;
+}
+
+static void task_stack_deallocate( void *stack )
+{
+  (void) stack;
+}
+
+#define CONFIGURE_TASK_STACK_ALLOCATOR task_stack_allocate
+
+#define CONFIGURE_TASK_STACK_DEALLOCATOR task_stack_deallocate
+
+""" + _CONFIG_DEFAULT),
     _Test(
         "rtems/timer",
         "srv-after",
diff --git a/spec/rtems/timer/val/mem-srv-init.yml b/spec/rtems/timer/val/mem-srv-init.yml
index 3979298..4ef1fe9 100644
--- a/spec/rtems/timer/val/mem-srv-init.yml
+++ b/spec/rtems/timer/val/mem-srv-init.yml
@@ -16,6 +16,21 @@ test-code: |
     (void) rtems_timer_initiate_server( 0, 0, 0 );
   }
 
+  static void *task_stack_allocate( size_t size )
+  {
+    (void) size;
+    return NULL;
+  }
+
+  static void task_stack_deallocate( void *stack )
+  {
+    (void) stack;
+  }
+
+  #define CONFIGURE_TASK_STACK_ALLOCATOR task_stack_allocate
+
+  #define CONFIGURE_TASK_STACK_DEALLOCATOR task_stack_deallocate
+
   #define TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
 
   #define TASK_STORAGE_SIZE \



More information about the vc mailing list