![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
#include <stddef.h>
#include <sys/types.h>
Go to the source code of this file.
Functions | |
char * | system_home_path () |
const char * | system_env_var (const char *var) |
int | system_mmap (void **base, int *fd, const char *file, size_t shm_size, size_t shm_off, int truncate) |
size_t | system_total_memory () |
off_t | system_file_size (const char *file) |
const char * | system_exec_name () |
int | system_process_id () |
int | system_thread_id () |
const char * | system_backtrace (unsigned int skip) |
const char * system_backtrace | ( | unsigned int | skip | ) |
Get stack backtrace for calling thread. Returned string does not end with a new line.
skip | Number of functions to skip from trace.0 will show up to the caller. |
Definition at line 154 of file system.c.
References __backtraceStr, FMT, formatStackLine(), and MID.
Referenced by _arax_assert().
const char * system_env_var | ( | const char * | var | ) |
Get value of enviroment variable var
. NULL if variable not set.
Definition at line 32 of file system.c.
Referenced by conf_get(), and utils_config_get_source().
const char * system_exec_name | ( | ) |
off_t system_file_size | ( | const char * | file | ) |
Get size of file
in bytes.
Definition at line 68 of file system.c.
Referenced by conf_get(), and system_mmap().
char * system_home_path | ( | ) |
Get current users home directory.
Definition at line 21 of file system.c.
Referenced by utils_config_alloc_path().
int system_mmap | ( | void ** | base, |
int * | fd, | ||
const char * | file, | ||
size_t | shm_size, | ||
size_t | shm_off, | ||
int | truncate ) |
Type to mmap file
of size shm_size
.
base | If succesfull will return mmap location, null otherwise. Initial value is used as a hint. |
fd | File descriptor. If succesfull will be positive.Negative on failure. |
file | Location of mmap backing file. |
shm_size | Size of resulting mmap and file . |
shm_off | Skip bytes from the mmap of file . |
truncate | Truncate file to shm_size bytes. |
base
and fd
to figure error. Definition at line 37 of file system.c.
References fd, and system_file_size().
Referenced by _arax_init().
int system_process_id | ( | ) |
Get PID of current process
Definition at line 91 of file system.c.
Referenced by _arax_init(), and arax_exit().
int system_thread_id | ( | ) |
size_t system_total_memory | ( | ) |
Return total memory in bytes.
Definition at line 13 of file system.c.
Referenced by _arax_init().