Macros | Functions
syscall.cpp File Reference

Go to the source code of this file.

Macros

#define UNHANDLED()
 

Functions

clock_t times (struct tms *buf)
 
int execve (const char *path, char *const argv[], char *const envp[])
 
pid_t getpid (void)
 
int isatty (int fd)
 
off_t lseek (int fd, off_t offset, int whence)
 
void _init (void)
 
int kill (pid_t _pid, int _sig)
 
pid_t wait (int *status)
 
_READ_WRITE_RETURN_TYPE read (int fd, void *buffer, size_t length)
 
int unlink (const char *file)
 
pid_t fork (void)
 
void * sbrk (ptrdiff_t __incr)
 
int regcomp (regex_t *preg, const char *regex, int cflags)
 
int gettimeofday (struct timeval *tp, void *tzp)
 
int clock_gettime (clockid_t clk_id, struct timespec *tp) __THROW
 
int regexec (const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags)
 
void _fini (void)
 
int stat (const char *pathname, struct stat *buf)
 
int link (const char *oldpath, const char *newpath)
 
void _exit (int status)
 
int open (const char *file, int mode,...)
 
void regfree (regex_t *preg)
 
int fcntl (int fd, int cmd,...)
 
int mkdir (const char *path, mode_t mode)
 
int posix_memalign (void **memptr, size_t alignment, size_t size)
 
int close (int fd)
 
int sigprocmask (int how, const sigset_t *set, sigset_t *oldset)
 
long sysconf (int name)
 
int nanosleep (const struct timespec *req, struct timespec *rem)
 
void * malloc (size_t size)
 
void free (void *ptr)
 
void * calloc (size_t nmemb, size_t size)
 
void * realloc (void *ptr, size_t size)
 
int fstat (int file, struct stat *sbuf)
 
int getentropy (void *buf, size_t buflen)
 
int __fpclassifyf (float val)
 
int __fpclassifyd (double val)
 
double ldexp (double x, int exp)
 
float nanf (const char *tagp)
 
int sched_yield (void)
 

Macro Definition Documentation

◆ UNHANDLED

#define UNHANDLED ( )
Value:
{ \
const char *str_text = "\033[1;33mWARNING\033[0m: unsupported libc function called = "; \
const char *str_func = __PRETTY_FUNCTION__; \
const char *str_endl = "\n"; \
write(0, str_text, strlen(str_text)); \
write(0, str_func, strlen(str_func)); \
write(0, str_endl, strlen(str_endl)); \
}

Definition at line 35 of file syscall.cpp.

Function Documentation

◆ times()

clock_t times ( struct tms *  buf)

Definition at line 46 of file syscall.cpp.

◆ execve()

int execve ( const char *  path,
char *const  argv[],
char *const  envp[] 
)

Definition at line 56 of file syscall.cpp.

◆ getpid()

pid_t getpid ( void  )

Definition at line 69 of file syscall.cpp.

◆ isatty()

int isatty ( int  fd)

Definition at line 77 of file syscall.cpp.

◆ lseek()

off_t lseek ( int  fd,
off_t  offset,
int  whence 
)

Definition at line 88 of file syscall.cpp.

◆ _init()

void _init ( void  )

Definition at line 101 of file syscall.cpp.

◆ kill()

int kill ( pid_t  _pid,
int  _sig 
)

Definition at line 105 of file syscall.cpp.

◆ wait()

pid_t wait ( int *  status)

Definition at line 117 of file syscall.cpp.

◆ read()

_READ_WRITE_RETURN_TYPE read ( int  fd,
void *  buffer,
size_t  length 
)

Definition at line 128 of file syscall.cpp.

◆ unlink()

int unlink ( const char *  file)

Definition at line 141 of file syscall.cpp.

◆ fork()

pid_t fork ( void  )

Definition at line 152 of file syscall.cpp.

◆ sbrk()

void* sbrk ( ptrdiff_t  __incr)

Definition at line 161 of file syscall.cpp.

◆ regcomp()

int regcomp ( regex_t *  preg,
const char *  regex,
int  cflags 
)

Definition at line 172 of file syscall.cpp.

◆ gettimeofday()

int gettimeofday ( struct timeval *  tp,
void *  tzp 
)

Definition at line 184 of file syscall.cpp.

◆ clock_gettime()

int clock_gettime ( clockid_t  clk_id,
struct timespec *  tp 
)

Definition at line 196 of file syscall.cpp.

◆ regexec()

int regexec ( const regex_t *  preg,
const char *  string,
size_t  nmatch,
regmatch_t  pmatch[],
int  eflags 
)

Definition at line 208 of file syscall.cpp.

◆ _fini()

void _fini ( void  )

Definition at line 223 of file syscall.cpp.

◆ stat()

int stat ( const char *  pathname,
struct stat *  buf 
)

Definition at line 227 of file syscall.cpp.

◆ link()

int link ( const char *  oldpath,
const char *  newpath 
)

Definition at line 239 of file syscall.cpp.

◆ _exit()

void _exit ( int  status)

Definition at line 251 of file syscall.cpp.

◆ open()

int open ( const char *  file,
int  mode,
  ... 
)

Definition at line 261 of file syscall.cpp.

◆ regfree()

void regfree ( regex_t *  preg)

Definition at line 273 of file syscall.cpp.

◆ fcntl()

int fcntl ( int  fd,
int  cmd,
  ... 
)

Definition at line 281 of file syscall.cpp.

◆ mkdir()

int mkdir ( const char *  path,
mode_t  mode 
)

Definition at line 293 of file syscall.cpp.

◆ posix_memalign()

int posix_memalign ( void **  memptr,
size_t  alignment,
size_t  size 
)

Definition at line 305 of file syscall.cpp.

◆ close()

int close ( int  fd)

Definition at line 317 of file syscall.cpp.

◆ sigprocmask()

int sigprocmask ( int  how,
const sigset_t *  set,
sigset_t *  oldset 
)

Definition at line 328 of file syscall.cpp.

◆ sysconf()

long sysconf ( int  name)

Definition at line 341 of file syscall.cpp.

◆ nanosleep()

int nanosleep ( const struct timespec *  req,
struct timespec *  rem 
)

Definition at line 352 of file syscall.cpp.

◆ malloc()

void* malloc ( size_t  size)

Definition at line 364 of file syscall.cpp.

◆ free()

void free ( void *  ptr)

Definition at line 370 of file syscall.cpp.

◆ calloc()

void* calloc ( size_t  nmemb,
size_t  size 
)

Definition at line 376 of file syscall.cpp.

◆ realloc()

void* realloc ( void *  ptr,
size_t  size 
)

Definition at line 382 of file syscall.cpp.

◆ fstat()

int fstat ( int  file,
struct stat sbuf 
)

Definition at line 388 of file syscall.cpp.

◆ getentropy()

int getentropy ( void *  buf,
size_t  buflen 
)

Definition at line 398 of file syscall.cpp.

◆ __fpclassifyf()

int __fpclassifyf ( float  val)

Definition at line 408 of file syscall.cpp.

◆ __fpclassifyd()

int __fpclassifyd ( double  val)

Definition at line 415 of file syscall.cpp.

◆ ldexp()

double ldexp ( double  x,
int  exp 
)

Definition at line 422 of file syscall.cpp.

◆ nanf()

float nanf ( const char *  tagp)

Definition at line 428 of file syscall.cpp.

◆ sched_yield()

int sched_yield ( void  )

Definition at line 434 of file syscall.cpp.