[rtems commit] rtems: Change timer server task mode setting

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


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Sat Feb 15 12:03:39 2020 +0100

rtems: Change timer server task mode setting

Use the non-preempt mode only in uni-processor configurations.

Update #3876.

---

 cpukit/rtems/src/timerserver.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/cpukit/rtems/src/timerserver.c b/cpukit/rtems/src/timerserver.c
index 2ebceca..1a332b8 100644
--- a/cpukit/rtems/src/timerserver.c
+++ b/cpukit/rtems/src/timerserver.c
@@ -181,11 +181,13 @@ static rtems_status_code _Timer_server_Initiate(
     rtems_build_name('T','I','M','E'),
     priority,
     stack_size,
-    rtems_configuration_is_smp_enabled() ?
-      RTEMS_DEFAULT_MODES : /* no preempt is not supported for SMP */
-      RTEMS_NO_PREEMPT,   /* no preempt is like an interrupt */
-                          /* user may want floating point but we need */
-                          /*   system task specified for 0 priority */
+#ifdef RTEMS_SMP
+    RTEMS_DEFAULT_MODES, /* no preempt is not recommended for SMP */
+#else
+    RTEMS_NO_PREEMPT,    /* no preempt is like an interrupt */
+#endif
+    /* user may want floating point but we need */
+    /*   system task specified for 0 priority */
     attribute_set | RTEMS_SYSTEM_TASK,
     &id
   );



More information about the vc mailing list