Changeset 2807d556 in rtems


Ignore:
Timestamp:
Feb 13, 2020, 10:37:02 AM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
f1baeb0
Parents:
88c40ef8
git-author:
Sebastian Huber <sebastian.huber@…> (02/13/20 10:37:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/17/20 07:03:55)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/wkspace.c

    r88c40ef8 r2807d556  
    2323#include <rtems/score/heapimpl.h>
    2424#include <rtems/score/interr.h>
    25 #include <rtems/score/threadimpl.h>
    26 #include <rtems/posix/pthread.h>
    2725#include <rtems/config.h>
    2826#include <rtems/sysinit.h>
    29 
    30 #include <string.h>
    31 
    32 /* #define DEBUG_WORKSPACE */
    33 #if defined(DEBUG_WORKSPACE)
    34   #include <rtems/bspIo.h>
    35 #endif
    3627
    3728Heap_Control _Workspace_Area;
     
    114105}
    115106
    116 void *_Workspace_Allocate(
    117   size_t   size
    118 )
     107void *_Workspace_Allocate( size_t size )
    119108{
    120   void *memory;
    121 
    122   memory = _Heap_Allocate( &_Workspace_Area, size );
    123   #if defined(DEBUG_WORKSPACE)
    124     printk(
    125       "Workspace_Allocate(%d) from %p/%p -> %p\n",
    126       size,
    127       __builtin_return_address( 0 ),
    128       __builtin_return_address( 1 ),
    129       memory
    130     );
    131   #endif
    132   return memory;
     109  return _Heap_Allocate( &_Workspace_Area, size );
    133110}
    134111
    135 /*
    136  *  _Workspace_Free
    137  */
    138 void _Workspace_Free(
    139   void *block
    140 )
     112void _Workspace_Free( void *block )
    141113{
    142   #if defined(DEBUG_WORKSPACE)
    143     printk(
    144       "Workspace_Free(%p) from %p/%p\n",
    145       block,
    146       __builtin_return_address( 0 ),
    147       __builtin_return_address( 1 )
    148     );
    149   #endif
    150114  _Heap_Free( &_Workspace_Area, block );
    151115}
Note: See TracChangeset for help on using the changeset viewer.