From f455cdeabe554cf2bde599aa184aacb84cfa5681 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 3 Jun 2015 00:20:54 +0200 Subject: 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(-) (limited to 'cpukit/score') 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. -- cgit v1.2.3