Go to the documentation of this file.
13 #include <sys/times.h>
22 #define MAX_STACK_SIZE 0x2000
28 register char * stack_ptr
asm(
"sp");
34 caddr_t
_sbrk(
int incr)
36 extern char end
asm(
"end");
37 static char *heap_end;
38 char *prev_heap_end,*min_stack_ptr;
43 prev_heap_end = heap_end;
47 min_stack_ptr = (
char*)(*(
unsigned int *)*(
unsigned int *)0xE000ED08);
51 if (heap_end + incr > min_stack_ptr)
53 if (heap_end + incr > stack_ptr)
64 return (caddr_t) prev_heap_end;
75 tzp->tz_minuteswest = 0;
106 for (DataIdx = 0; DataIdx < len; DataIdx++)
120 st->st_mode = S_IFCHR;
134 int _read(
int file,
char *ptr,
int len)
138 for (DataIdx = 0; DataIdx < len; DataIdx++)
146 int _open(
char *path,
int flags, ...)
169 int _stat(
char *file,
struct stat *st)
171 st->st_mode = S_IFCHR;
int _gettimeofday(struct timeval *tp, struct timezone *tzp)
int _times(struct tms *buf)
int _fstat(int file, struct stat *st)
int _write(int file, char *ptr, int len)
int _open(char *path, int flags,...)
int _stat(char *file, struct stat *st)
int _read(int file, char *ptr, int len)
void * _sbrk(ptrdiff_t incr)
_sbrk() allocates memory to the newlib heap and is used by malloc and others from the C library
int __io_putchar(int ch) __attribute__((weak))
int _kill(int pid, int sig)
int _execve(char *name, char **argv, char **env)
void initialise_monitor_handles()
int _lseek(int file, int ptr, int dir)
int _link(char *old, char *new)
__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
Reverse byte order (16 bit)