[rtems commit] score: Clean up wkspace.c
Sebastian Huber
sebh at rtems.org
Mon Feb 17 07:46:39 UTC 2020
Module: rtems
Branch: master
Commit: 2807d55666102610880c8e01e507b2fe9a994787
Changeset: http://git.rtems.org/rtems/commit/?id=2807d55666102610880c8e01e507b2fe9a994787
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Feb 13 11:37:02 2020 +0100
score: Clean up wkspace.c
Remove DEBUG_WORKSPACE support. There are better ways to trace the
application. See Tracing chapter in the RTEMS User Manual.
Remove superfluous includes. Change format.
---
cpukit/score/src/wkspace.c | 42 +++---------------------------------------
1 file changed, 3 insertions(+), 39 deletions(-)
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index 049b857..8c3f518 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -22,18 +22,9 @@
#include <rtems/score/assert.h>
#include <rtems/score/heapimpl.h>
#include <rtems/score/interr.h>
-#include <rtems/score/threadimpl.h>
-#include <rtems/posix/pthread.h>
#include <rtems/config.h>
#include <rtems/sysinit.h>
-#include <string.h>
-
-/* #define DEBUG_WORKSPACE */
-#if defined(DEBUG_WORKSPACE)
- #include <rtems/bspIo.h>
-#endif
-
Heap_Control _Workspace_Area;
static void _Workspace_Initialize( void )
@@ -113,39 +104,12 @@ void _Workspace_Handler_initialization(
_Heap_Protection_set_delayed_free_fraction( &_Workspace_Area, 1 );
}
-void *_Workspace_Allocate(
- size_t size
-)
+void *_Workspace_Allocate( size_t size )
{
- void *memory;
-
- memory = _Heap_Allocate( &_Workspace_Area, size );
- #if defined(DEBUG_WORKSPACE)
- printk(
- "Workspace_Allocate(%d) from %p/%p -> %p\n",
- size,
- __builtin_return_address( 0 ),
- __builtin_return_address( 1 ),
- memory
- );
- #endif
- return memory;
+ return _Heap_Allocate( &_Workspace_Area, size );
}
-/*
- * _Workspace_Free
- */
-void _Workspace_Free(
- void *block
-)
+void _Workspace_Free( void *block )
{
- #if defined(DEBUG_WORKSPACE)
- printk(
- "Workspace_Free(%p) from %p/%p\n",
- block,
- __builtin_return_address( 0 ),
- __builtin_return_address( 1 )
- );
- #endif
_Heap_Free( &_Workspace_Area, block );
}
More information about the vc
mailing list