On 2014-02-07 08:49, Chris Johns wrote:
On 4/02/2014 8:01 pm, Sebastian Huber wrote:
+RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_maximum_internal_threads(void)
+{
+ uint32_t maximum_internal_threads = 0;
+
+ /* Idle threads */
+ maximum_internal_threads += rtems_configuration_get_maximum_processors();
+
Why is the code setting the local variable to 0 then doing the addition ?
Hm, this was a copy and paste from an earlier version which did three additions
like this in row.
What about the attached patch?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>From d326b3b3aab0b40fdc017e685300480676c4f7ae Mon Sep 17 00:00:00 2001
From: Sebastian Huber <sebastian.hu...@embedded-brains.de>
Date: Fri, 7 Feb 2014 08:55:02 +0100
Subject: [PATCH] score: Format _Thread_Get_maximum_internal_threads
---
cpukit/score/include/rtems/score/threadimpl.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 6eb7a03..4f4fbc7 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -596,10 +596,9 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_maximum_internal_threads(void)
{
- uint32_t maximum_internal_threads = 0;
-
/* Idle threads */
- maximum_internal_threads += rtems_configuration_get_maximum_processors();
+ uint32_t maximum_internal_threads =
+ rtems_configuration_get_maximum_processors();
/* MPCI thread */
#if defined(RTEMS_MULTIPROCESSING)
--
1.7.7
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel