summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-03 00:20:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-03 09:20:51 +0200
commitf455cdeabe554cf2bde599aa184aacb84cfa5681 (patch)
treea15b3cc92a47db8b25df390ab38b1e70841613fd /cpukit/score/include/rtems/score
parentsmptests/smpscheduler02: Reduce required CPU count (diff)
downloadrtems-f455cdeabe554cf2bde599aa184aacb84cfa5681.tar.bz2
rtems: Change CONTEXT_FP_SIZE define
Define CONTEXT_FP_SIZE to zero in case hardware and software floating point support is disabled. The problem is that empty structures have a different size in C and C++. In C++ they have a non-zero size leading to an overestimate of the workspace size.
Diffstat (limited to '')
-rw-r--r--cpukit/score/include/rtems/score/context.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/context.h b/cpukit/score/include/rtems/score/context.h
index 4619985c89..7e59f05d60 100644
--- a/cpukit/score/include/rtems/score/context.h
+++ b/cpukit/score/include/rtems/score/context.h
@@ -43,7 +43,11 @@ extern "C" {
* This constant defines the number of bytes required
* to store a full floating point context.
*/
-#define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
+ #define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
+#else
+ #define CONTEXT_FP_SIZE 0
+#endif
/**
* @brief Initialize context area.