[rtems commit] rtems: Change CONTEXT_FP_SIZE define
Sebastian Huber
sebh at rtems.org
Wed Jun 3 08:08:18 UTC 2015
Module: rtems
Branch: master
Commit: f455cdeabe554cf2bde599aa184aacb84cfa5681
Changeset: http://git.rtems.org/rtems/commit/?id=f455cdeabe554cf2bde599aa184aacb84cfa5681
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jun 3 00:20:54 2015 +0200
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.
---
cpukit/score/include/rtems/score/context.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cpukit/score/include/rtems/score/context.h b/cpukit/score/include/rtems/score/context.h
index 4619985..7e59f05 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.
More information about the vc
mailing list