mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-31 07:28:37 -04:00
CI-CD Updates (#768)
* Use new version of CI-CD Actions * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Format and spell check all files in the portable directory * Remove the https:// from #errors and #warnings as uncrustify attempts to change it to /* * Use checkout@v3 instead of checkout@v2 on all jobs ---------
This commit is contained in:
parent
d6bccb1f4c
commit
5fb9b50da8
485 changed files with 108790 additions and 107581 deletions
|
@ -30,26 +30,29 @@
|
|||
/* 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 accocation 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)
|
||||
extern char * sbrk( int size )
|
||||
{
|
||||
if( ( brk_siz + size > _heep_size ) || ( brk_siz + size < 0 ) )
|
||||
{
|
||||
if (brk_siz + size > _heep_size || brk_siz + size < 0)
|
||||
|
||||
return((char*)-1);
|
||||
brk_siz += size;
|
||||
return( (char*)_heep + brk_siz - size);
|
||||
return( ( char * ) -1 );
|
||||
}
|
||||
|
||||
brk_siz += size;
|
||||
return( ( char * ) _heep + brk_siz - size );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue