CACAO
Static Public Member Functions
os Class Reference

Static Public Member Functions

static void abort ()
 
static int accept (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
static int access (const char *pathname, int mode)
 
static int atoi (const char *nptr)
 
static int backtrace (void **array, int size)
 
static char ** backtrace_symbols (void *const *array, int size) throw ()
 
static voidcalloc (size_t nmemb, size_t size)
 
static int close (int fd)
 
static int connect (int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen)
 
static int dlclose (void *handle)
 
static char * dlerror (void)
 
static voiddlopen (const char *filename, int flag)
 
static voiddlsym (void *handle, const char *symbol)
 
static int fclose (FILE *fp)
 
static FILE * fopen (const char *path, const char *mode)
 
static int vfprintf (FILE *stream, const char *format, va_list arg)
 
static size_t fread (void *ptr, size_t size, size_t nmemb, FILE *stream)
 
static void free (void *ptr)
 
static char * getcwd (char *buf, size_t size)
 
static char * getenv (const char *name)
 
static int gethostname (char *name, size_t len)
 
static int getloadavg (double loadavg[], int nelem)
 
static int getpagesize (void)
 
static pid_t getpid (void)
 
static int getsockname (int s, struct sockaddr *name, socklen_t *namelen)
 
static int getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen)
 
static int listen (int sockfd, int backlog)
 
static voidmalloc (size_t size)
 
static voidmemcpy (void *dest, const void *src, size_t n)
 
static voidmemset (void *s, int c, size_t n)
 
static int mprotect (void *addr, size_t len, int prot)
 
static ssize_t readlink (const char *path, char *buf, size_t bufsiz)
 
static int scandir (const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const void *, const void *))
 
static ssize_t send (int s, const void *buf, size_t len, int flags)
 
static int setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen)
 
static int shutdown (int s, int how)
 
static int socket (int domain, int type, int protocol)
 
static int stat (const char *path, struct stat *buf)
 
static char * strcat (char *dest, const char *src)
 
static int strcmp (const char *s1, const char *s2)
 
static char * strcpy (char *dest, const char *src)
 
static char * strdup (const char *s)
 
static size_t strlen (const char *s)
 
static char * strerror (int errnum)
 
static void abort (const char *text,...)
 Prints an error message and aborts the VM. More...
 
static void abort_errnum (int errnum, const char *text,...)
 Prints an error message, appends ":" plus the strerror-message of errnum and aborts the VM. More...
 
static void abort_errno (const char *text,...)
 Equal to abort_errnum, but uses errno to get the error number. More...
 
static char * getcwd (void)
 Return the current working directory. More...
 
static voidmmap_anonymous (void *addr, size_t len, int prot, int flags)
 Maps anonymous memory, even on systems not defining MAP_ANON(YMOUS). More...
 
static void print_backtrace ()
 Print a C backtrace. More...
 
static int processors_online ()
 Returns the number of online processors in the system. More...
 
static void shouldnotreach (const char *text,...)
 Prints a should not reach message and aborts the VM. More...
 
static void shouldnotreach ()
 
static void unimplemented (const char *text,...)
 Prints an unimplemented message and aborts the VM. More...
 
static void unimplemented ()
 
template<class _F1 , class _F2 >
static int call_scandir (int(*scandir)(const char *, struct dirent ***, _F1, _F2), const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const void *, const void *))
 

Detailed Description

Definition at line 123 of file os.hpp.

Member Function Documentation

void os::abort ( void  )
inlinestatic

Definition at line 196 of file os.hpp.

void os::abort ( const char *  text,
  ... 
)
static

Prints an error message and aborts the VM.

Parameters
textError message to print.

Definition at line 49 of file os.cpp.

void os::abort_errno ( const char *  text,
  ... 
)
static

Equal to abort_errnum, but uses errno to get the error number.

Parameters
textError message to print.

Definition at line 165 of file os.cpp.

void os::abort_errnum ( int  errnum,
const char *  text,
  ... 
)
static

Prints an error message, appends ":" plus the strerror-message of errnum and aborts the VM.

Parameters
errnumError number.
textError message to print.

Definition at line 150 of file os.cpp.

int os::accept ( int  sockfd,
struct sockaddr *  addr,
socklen_t *  addrlen 
)
inlinestatic

Definition at line 205 of file os.hpp.

int os::access ( const char *  pathname,
int  mode 
)
inlinestatic

Definition at line 214 of file os.hpp.

int os::atoi ( const char *  nptr)
inlinestatic

Definition at line 223 of file os.hpp.

int os::backtrace ( void **  array,
int  size 
)
inlinestatic

Definition at line 232 of file os.hpp.

char ** os::backtrace_symbols ( void *const *  array,
int  size 
)
throw (
)
inlinestatic

Definition at line 242 of file os.hpp.

template<class _F1 , class _F2 >
int os::call_scandir ( int(*)(const char *, struct dirent ***, _F1, _F2)  scandir,
const char *  dir,
struct dirent ***  namelist,
int(*)(const struct dirent *)  filter,
int(*)(const void *, const void *)  compar 
)
inlinestatic

Definition at line 556 of file os.hpp.

void * os::calloc ( size_t  nmemb,
size_t  size 
)
inlinestatic

Definition at line 252 of file os.hpp.

int os::close ( int  fd)
inlinestatic

Definition at line 261 of file os.hpp.

int os::connect ( int  sockfd,
const struct sockaddr *  serv_addr,
socklen_t  addrlen 
)
inlinestatic

Definition at line 270 of file os.hpp.

int os::dlclose ( void handle)
inlinestatic

Definition at line 290 of file os.hpp.

char * os::dlerror ( void  )
inlinestatic

Definition at line 299 of file os.hpp.

void * os::dlopen ( const char *  filename,
int  flag 
)
inlinestatic

Definition at line 310 of file os.hpp.

void * os::dlsym ( void handle,
const char *  symbol 
)
inlinestatic

Definition at line 319 of file os.hpp.

int os::fclose ( FILE *  fp)
inlinestatic

Definition at line 328 of file os.hpp.

FILE * os::fopen ( const char *  path,
const char *  mode 
)
inlinestatic

Definition at line 337 of file os.hpp.

size_t os::fread ( void ptr,
size_t  size,
size_t  nmemb,
FILE *  stream 
)
inlinestatic

Definition at line 361 of file os.hpp.

void os::free ( void ptr)
inlinestatic

Definition at line 370 of file os.hpp.

char * os::getcwd ( char *  buf,
size_t  size 
)
inlinestatic

Definition at line 397 of file os.hpp.

char * os::getcwd ( void  )
static

Return the current working directory.

Returns
Pointer to a char array allocated by MNEW, or NULL if memory could not be allocated.

Definition at line 181 of file os.cpp.

char * os::getenv ( const char *  name)
inlinestatic

Definition at line 406 of file os.hpp.

int os::gethostname ( char *  name,
size_t  len 
)
inlinestatic

Definition at line 415 of file os.hpp.

int os::getloadavg ( double  loadavg[],
int  nelem 
)
inlinestatic

Definition at line 424 of file os.hpp.

int os::getpagesize ( void  )
inlinestatic

Definition at line 433 of file os.hpp.

pid_t os::getpid ( void  )
inlinestatic

Definition at line 438 of file os.hpp.

int os::getsockname ( int  s,
struct sockaddr *  name,
socklen_t *  namelen 
)
inlinestatic

Definition at line 447 of file os.hpp.

int os::getsockopt ( int  s,
int  level,
int  optname,
void optval,
socklen_t *  optlen 
)
inlinestatic

Definition at line 456 of file os.hpp.

int os::listen ( int  sockfd,
int  backlog 
)
inlinestatic

Definition at line 465 of file os.hpp.

void * os::malloc ( size_t  size)
inlinestatic

Definition at line 483 of file os.hpp.

void * os::memcpy ( void dest,
const void src,
size_t  n 
)
inlinestatic

Definition at line 492 of file os.hpp.

void * os::memset ( void s,
int  c,
size_t  n 
)
inlinestatic

Definition at line 501 of file os.hpp.

void * os::mmap_anonymous ( void addr,
size_t  len,
int  prot,
int  flags 
)
static

Maps anonymous memory, even on systems not defining MAP_ANON(YMOUS).

Parameters
...

Definition at line 215 of file os.cpp.

int os::mprotect ( void addr,
size_t  len,
int  prot 
)
inlinestatic

Definition at line 510 of file os.hpp.

void os::print_backtrace ( )
static

Print a C backtrace.

Definition at line 252 of file os.cpp.

int os::processors_online ( void  )
static

Returns the number of online processors in the system.

Returns
Number of online processors.

Definition at line 278 of file os.cpp.

ssize_t os::readlink ( const char *  path,
char *  buf,
size_t  bufsiz 
)
inlinestatic

Definition at line 537 of file os.hpp.

int os::scandir ( const char *  dir,
struct dirent ***  namelist,
int(*)(const struct dirent *)  filter,
int(*)(const void *, const void *)  compar 
)
inlinestatic

Definition at line 561 of file os.hpp.

ssize_t os::send ( int  s,
const void buf,
size_t  len,
int  flags 
)
inlinestatic

Definition at line 570 of file os.hpp.

int os::setsockopt ( int  s,
int  level,
int  optname,
const void optval,
socklen_t  optlen 
)
inlinestatic

Definition at line 580 of file os.hpp.

void os::shouldnotreach ( const char *  text,
  ... 
)
static

Prints a should not reach message and aborts the VM.

Parameters
textError message to print.

Definition at line 74 of file os.cpp.

void os::shouldnotreach ( void  )
inlinestatic

Definition at line 690 of file os.hpp.

int os::shutdown ( int  s,
int  how 
)
inlinestatic

Definition at line 589 of file os.hpp.

int os::socket ( int  domain,
int  type,
int  protocol 
)
inlinestatic

Definition at line 598 of file os.hpp.

int os::stat ( const char *  path,
struct stat *  buf 
)
inlinestatic

Definition at line 607 of file os.hpp.

char * os::strcat ( char *  dest,
const char *  src 
)
inlinestatic

Definition at line 627 of file os.hpp.

int os::strcmp ( const char *  s1,
const char *  s2 
)
inlinestatic

Definition at line 636 of file os.hpp.

char * os::strcpy ( char *  dest,
const char *  src 
)
inlinestatic

Definition at line 645 of file os.hpp.

char * os::strdup ( const char *  s)
inlinestatic

Definition at line 654 of file os.hpp.

char * os::strerror ( int  errnum)
inlinestatic

Definition at line 663 of file os.hpp.

size_t os::strlen ( const char *  s)
inlinestatic

Definition at line 672 of file os.hpp.

void os::unimplemented ( const char *  text,
  ... 
)
static

Prints an unimplemented message and aborts the VM.

Parameters
textError message to print.

Definition at line 100 of file os.cpp.

void os::unimplemented ( void  )
inlinestatic

Definition at line 695 of file os.hpp.

int os::vfprintf ( FILE *  stream,
const char *  format,
va_list  arg 
)
inlinestatic

Definition at line 351 of file os.hpp.


The documentation for this class was generated from the following files: