[rtems commit] sptests/spsysinit01: Fix for RTEMS_DEBUG

Sebastian Huber sebh at rtems.org
Tue Mar 1 14:01:39 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Mar  1 15:00:43 2016 +0100

sptests/spsysinit01: Fix for RTEMS_DEBUG

Update #2408.

---

 testsuites/sptests/spsysinit01/init.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index 0aeb4ee..60e3747 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -612,13 +612,17 @@ LAST(RTEMS_SYSINIT_DEVICE_DRIVERS)
 
 FIRST(RTEMS_SYSINIT_CLASSIC_USER_TASKS)
 {
+  _Objects_Allocator_lock();
   assert(_Objects_Active_count(&_RTEMS_tasks_Information.Objects) == 0);
+  _Objects_Allocator_unlock();
   next_step(CLASSIC_USER_TASKS_PRE);
 }
 
 LAST(RTEMS_SYSINIT_CLASSIC_USER_TASKS)
 {
+  _Objects_Allocator_lock();
   assert(_Objects_Active_count(&_RTEMS_tasks_Information.Objects) == 1);
+  _Objects_Allocator_unlock();
   next_step(CLASSIC_USER_TASKS_POST);
 }
 
@@ -626,13 +630,17 @@ LAST(RTEMS_SYSINIT_CLASSIC_USER_TASKS)
 
 FIRST(RTEMS_SYSINIT_POSIX_USER_THREADS)
 {
+  _Objects_Allocator_lock();
   assert(_Objects_Active_count(&_POSIX_Threads_Information.Objects) == 0);
+  _Objects_Allocator_unlock();
   next_step(POSIX_USER_THREADS_PRE);
 }
 
 LAST(RTEMS_SYSINIT_POSIX_USER_THREADS)
 {
+  _Objects_Allocator_lock();
   assert(_Objects_Active_count(&_POSIX_Threads_Information.Objects) == 1);
+  _Objects_Allocator_unlock();
   next_step(POSIX_USER_THREADS_POST);
 }
 




More information about the vc mailing list