[rtems commit] sptests/sp51: Delete semaphore after use

Sebastian Huber sebh at rtems.org
Wed Dec 6 18:21:16 UTC 2017


Module:    rtems
Branch:    master
Commit:    9e339a8e7e84f0a2acd7bae898076522ca5aedf1
Changeset: http://git.rtems.org/rtems/commit/?id=9e339a8e7e84f0a2acd7bae898076522ca5aedf1

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Dec  6 19:17:03 2017 +0100

sptests/sp51: Delete semaphore after use

This ensures that the configured semaphore maximum is not exceeded.

---

 testsuites/sptests/sp51/init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testsuites/sptests/sp51/init.c b/testsuites/sptests/sp51/init.c
index d1c16d1..ff6b562 100644
--- a/testsuites/sptests/sp51/init.c
+++ b/testsuites/sptests/sp51/init.c
@@ -101,6 +101,9 @@ rtems_task Init(
   fatal_directive_status(
     sc, RTEMS_NOT_OWNER_OF_RESOURCE, "rtems_semaphore_release" );
 
+  sc = rtems_semaphore_delete( mutex );
+  directive_failed( sc, "rtems_semaphore_delete" );
+
   test_create_initially_locked_prio_inherit_sema();
 
   TEST_END();



More information about the vc mailing list