mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 23:10:16 +00:00
bsps: Move sbrk.c to bsps
This patch is a part of the BSP source reorganization. Update #3285.
This commit is contained in:
28
bsps/shared/start/sbrk.c
Normal file
28
bsps/shared/start/sbrk.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* sbrk.c
|
||||
*
|
||||
* If the BSP wants to dynamically allocate the memory for the
|
||||
* C Library heap (malloc) and/or be able to extend the heap,
|
||||
* then this routine must be functional. This is the default
|
||||
* implementation which raises an error.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void * sbrk(ptrdiff_t incr)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return (void *)-1;
|
||||
}
|
||||
Reference in New Issue
Block a user