Changeset 6365f81 in rtems for cpukit/score/inline


Ignore:
Timestamp:
Apr 22, 1996, 4:46:00 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
8faca06
Parents:
a155b3c
Message:

made initialization routine a regular subroutine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/inline/rtems/score/wkspace.inl

    ra155b3c r6365f81  
    1717#ifndef __WORKSPACE_inl
    1818#define __WORKSPACE_inl
    19 
    20 /*PAGE
    21  *
    22  *  _Workspace_Handler_initialization
    23  *
    24  *  DESCRIPTION:
    25  *
    26  *  This routine performs the initialization necessary for this handler.
    27  */
    28 
    29 STATIC INLINE void _Workspace_Handler_initialization(
    30   void       *starting_address,
    31   unsigned32  size
    32 )
    33 {
    34   unsigned32 *zero_out_array;
    35   unsigned32  index;
    36   unsigned32  memory_available;
    37 
    38   if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
    39     _Internal_error_Occurred(
    40       INTERNAL_ERROR_CORE,
    41       TRUE,
    42       INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
    43     );
    44 
    45   if ( _CPU_Table.do_zero_of_workspace ) {
    46     for( zero_out_array  = (unsigned32 *) starting_address, index = 0 ;
    47          index < size / 4 ;
    48          index++ )
    49       zero_out_array[ index ] = 0;
    50   }
    51 
    52   memory_available = _Heap_Initialize(
    53     &_Workspace_Area,
    54     starting_address,
    55     size,
    56     CPU_HEAP_ALIGNMENT
    57   );
    58 
    59   if ( memory_available == 0 )
    60     _Internal_error_Occurred(
    61       INTERNAL_ERROR_CORE,
    62       TRUE,
    63       INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
    64     );
    65 }
    6619
    6720/*PAGE
Note: See TracChangeset for help on using the changeset viewer.