[rtems commit] malloc: Clean up "malloc_p.h" header file

Sebastian Huber sebh at rtems.org
Thu Feb 25 10:55:09 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb 25 09:05:40 2016 +0100

malloc: Clean up "malloc_p.h" header file

---

 cpukit/libcsupport/src/malloc_deferred.c |  2 +-
 cpukit/libcsupport/src/malloc_p.h        | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c
index 81559c4..e85b264 100644
--- a/cpukit/libcsupport/src/malloc_deferred.c
+++ b/cpukit/libcsupport/src/malloc_deferred.c
@@ -23,10 +23,10 @@
 
 #ifdef RTEMS_NEWLIB
 #include <stdlib.h>
-#include <errno.h>
 
 #include "malloc_p.h"
 
+#include <rtems/chain.h>
 #include <rtems/score/sysstate.h>
 #include <rtems/score/threaddispatch.h>
 
diff --git a/cpukit/libcsupport/src/malloc_p.h b/cpukit/libcsupport/src/malloc_p.h
index 89adc5f..6609526 100644
--- a/cpukit/libcsupport/src/malloc_p.h
+++ b/cpukit/libcsupport/src/malloc_p.h
@@ -10,16 +10,12 @@
  */
 
 #include <rtems.h>
-#include <rtems/libcsupport.h>
 #include <rtems/score/protectedheap.h>
 #include <rtems/malloc.h>
 
-#ifdef RTEMS_NEWLIB
-#include <sys/reent.h>
-#endif
-
-#include <stdint.h>
-#include <rtems/chain.h>
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
 /*
  *  Process deferred free operations
@@ -27,3 +23,7 @@
 bool malloc_is_system_state_OK(void);
 void malloc_deferred_frees_process(void);
 void malloc_deferred_free(void *);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */




More information about the vc mailing list