[rtems commit] rtems: Simplify _RTEMS_tasks_Initialize_user_task()

Sebastian Huber sebh at rtems.org
Tue Feb 25 11:32:18 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb 14 09:34:03 2020 +0100

rtems: Simplify _RTEMS_tasks_Initialize_user_task()

Due to the system initialization order, the _Thread_Global_constructor
must be 0 in this function.

---

 cpukit/rtems/src/taskinitusers.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index 0645de3..3f913b8 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -56,7 +56,6 @@ void _RTEMS_tasks_Initialize_user_task( void )
   _Assert( rtems_is_status_successful( return_value ) );
   (void) return_value;
 
-  if ( _Thread_Global_constructor == 0 ) {
-    _Thread_Global_constructor = id;
-  }
+  _Assert( _Thread_Global_constructor == 0 );
+  _Thread_Global_constructor = id;
 }



More information about the vc mailing list