theCore C++ embedded framework
stubs.cpp File Reference

Newlib stubs implementation. More...

#include <common/execution.hpp>
#include <stdlib.h>
#include <sys/unistd.h>
#include <sys/stat.h>
#include <sys/times.h>
#include <errno.h>
Include dependency graph for stubs.cpp:

Functions

void _exit (int status)
 
int _close (int file)
 
int _execve (const char *name, char *const *argv, char *const *env)
 
int _fork (void)
 
int _fstat (int file, struct stat *st)
 
int _getpid (void)
 
int _kill (int pid, int sig)
 
int _link (const char *old, const char *nw)
 
off_t _lseek (int file, off_t oft, int dir)
 
int _read (int file, void *ptr, size_t len)
 
void * _sbrk (ptrdiff_t incr)
 
int _stat (const char *__restrict file, struct stat *__restrict st)
 
clock_t _times (struct tms *buf)
 
int _unlink (const char *name)
 
int _wait (int *status)
 
int _write (int file, const void *ptr, size_t sz)
 

Variables

int errno
 
char * __env [1] = { 0 }
 
char ** environ = __env
 

Detailed Description

Newlib stubs implementation.

Not all newlib functionality is allowed (by default) in theCore. Examples include forking or using memory allocations.

Function Documentation

◆ _exit()

void _exit ( int  status)
Here is the call graph for this function:

◆ _close()

int _close ( int  file)

◆ _execve()

int _execve ( const char *  name,
char *const *  argv,
char *const *  env 
)

◆ _fork()

int _fork ( void  )

◆ _fstat()

int _fstat ( int  file,
struct stat *  st 
)

◆ _getpid()

int _getpid ( void  )

◆ _kill()

int _kill ( int  pid,
int  sig 
)

◆ _link()

int _link ( const char *  old,
const char *  nw 
)

◆ _lseek()

off_t _lseek ( int  file,
off_t  oft,
int  dir 
)

◆ _read()

int _read ( int  file,
void *  ptr,
size_t  len 
)

◆ _sbrk()

void* _sbrk ( ptrdiff_t  incr)
Here is the call graph for this function:

◆ _stat()

int _stat ( const char *__restrict  file,
struct stat *__restrict  st 
)

◆ _times()

clock_t _times ( struct tms *  buf)

◆ _unlink()

int _unlink ( const char *  name)

◆ _wait()

int _wait ( int *  status)

◆ _write()

int _write ( int  file,
const void *  ptr,
size_t  sz 
)

Variable Documentation

◆ errno

int errno

◆ __env

char * __env = { 0 }

◆ environ

char ** environ = __env