Changeset 5b33dc80 in rtems


Ignore:
Timestamp:
Jan 9, 2008, 10:35:10 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
bc0ff47
Parents:
4d320062
Message:

2008-01-09 Joel Sherrill <joel.sherrill@…>

  • score/include/rtems/score/wkspace.h, score/inline/rtems/score/wkspace.inl, score/src/wkspace.c: Do not inline _Workspace_Free or _Workspace_Allocate since they are not always inlined and actually smaller overall as subroutines. They are not particularly time critical so inlining is not absolutely necessary.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r4d320062 r5b33dc80  
     12008-01-09      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * score/include/rtems/score/wkspace.h,
     4        score/inline/rtems/score/wkspace.inl, score/src/wkspace.c: Do not
     5        inline _Workspace_Free or _Workspace_Allocate since they are not
     6        always inlined and actually smaller overall as subroutines. They are
     7        not particularly time critical so inlining is not absolutely
     8        necessary.
     9
    1102008-01-09      Joel Sherrill <joel.sherrill@OARcorp.com>
    211
  • cpukit/score/include/rtems/score/wkspace.h

    r4d320062 r5b33dc80  
    5656);
    5757
     58/** @brief Allocate Memory from Workspace
     59 *
     60 *  This routine returns the address of a block of memory of size
     61 *  bytes.  If a block of the appropriate size cannot be allocated
     62 *  from the workspace, then NULL is returned.
     63 *
     64 *  @param size is the requested size
     65 *
     66 *  @return a pointer to the requested memory or NULL.
     67 */
     68void *_Workspace_Allocate(
     69  size_t   size
     70);
     71
     72/** @brief Free Memory to the Workspace
     73 *
     74 *  This function frees the specified block of memory.  If the block
     75 *  belongs to the Workspace and can be successfully freed, then
     76 *  TRUE is returned.  Otherwise FALSE is returned.
     77 *
     78 *  @param block is the memory to free
     79 *
     80 *  @return TRUE if the free was successful.
     81 */
     82
     83boolean _Workspace_Free(
     84  void *block
     85);
     86
    5887/** @brief Workspace Allocate or Fail with Fatal Error
    5988 *
  • cpukit/score/inline/rtems/score/wkspace.inl

    r4d320062 r5b33dc80  
    77
    88/*
    9  *  COPYRIGHT (c) 1989-2004.
     9 *  COPYRIGHT (c) 1989-2007.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    2525 */
    2626
    27 /**
    28  *  This routine returns the address of a block of memory of size
    29  *  bytes.  If a block of the appropriate size cannot be allocated
    30  *  from the workspace, then NULL is returned.
    31  */
    32 
    33 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate(
    34   size_t   size
    35 )
    36 {
    37    return _Heap_Allocate( &_Workspace_Area, size );
    38 }
    39 
    40 /**
    41  *  This function frees the specified block of memory.  If the block
    42  *  belongs to the Workspace and can be successfully freed, then
    43  *  TRUE is returned.  Otherwise FALSE is returned.
    44  */
    45 
    46 RTEMS_INLINE_ROUTINE boolean _Workspace_Free(
    47   void *block
    48 )
    49 {
    50    return _Heap_Free( &_Workspace_Area, block );
    51 }
    52 
    5327/**@}*/
    5428
  • cpukit/score/src/wkspace.c

    r4d320062 r5b33dc80  
    2323#include <string.h>  /* for memset */
    2424
    25 /*PAGE
    26  *
     25/*
    2726 *  _Workspace_Handler_initialization
    2827 */
    29 
    3028void _Workspace_Handler_initialization(
    3129  void       *starting_address,
     
    6058}
    6159
    62 /*PAGE
    63  *
     60/*
     61 *  _Workspace_Allocate
     62 */
     63void *_Workspace_Allocate(
     64  size_t   size
     65)
     66{
     67   return _Heap_Allocate( &_Workspace_Area, size );
     68}
     69
     70/*
     71 *  _Workspace_Allocate
     72 */
     73boolean _Workspace_Free(
     74  void *block
     75)
     76{
     77   return _Heap_Free( &_Workspace_Area, block );
     78}
     79
     80/*
    6481 *  _Workspace_Allocate_or_fatal_error
    65  *
    6682 */
    67 
    6883void *_Workspace_Allocate_or_fatal_error(
    6984  size_t      size
Note: See TracChangeset for help on using the changeset viewer.