Revert Portable/Softune Formatting (#886)

* Revert formatting on Softune ports

* Fix spelling mistakes

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
Soren Ptak 2023-11-23 03:39:28 -08:00 committed by GitHub
parent 96cdeaa725
commit 92365c9784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 326 additions and 336 deletions

View file

@ -30,29 +30,26 @@
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES. */
/* (C) Fujitsu Microelectronics Europe GmbH */
/*---------------------------------------------------------------------------
* __STD_LIB_sbrk.C
* - Used by heap_3.c for memory allocation and deletion.
*
* /*---------------------------------------------------------------------------*/
__STD_LIB_sbrk.C
- Used by heap_3.c for memory allocation and deletion.
/*---------------------------------------------------------------------------*/
#include "FreeRTOSConfig.h"
#include <stdlib.h>
static long brk_siz = 0;
typedef int _heep_t;
#define ROUNDUP( s ) ( ( ( s ) + sizeof( _heep_t ) - 1 ) & ~( sizeof( _heep_t ) - 1 ) )
static _heep_t _heep[ ROUNDUP( configTOTAL_HEAP_SIZE ) / sizeof( _heep_t ) ];
#define _heep_size ROUNDUP( configTOTAL_HEAP_SIZE )
static long brk_siz = 0;
typedef int _heep_t;
#define ROUNDUP(s) (((s)+sizeof(_heep_t)-1)&~(sizeof(_heep_t)-1))
static _heep_t _heep[ROUNDUP(configTOTAL_HEAP_SIZE)/sizeof(_heep_t)];
#define _heep_size ROUNDUP(configTOTAL_HEAP_SIZE)
extern char * sbrk( int size )
{
if( ( brk_siz + size > _heep_size ) || ( brk_siz + size < 0 ) )
extern char *sbrk(int size)
{
return( ( char * ) -1 );
}
if (brk_siz + size > _heep_size || brk_siz + size < 0)
brk_siz += size;
return( ( char * ) _heep + brk_siz - size );
}
return((char*)-1);
brk_siz += size;
return( (char*)_heep + brk_siz - size);
}