|  | Arax -8d09c51940345c86062e8ef2427c705ae66e5926
    A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators | 
#include "system.h"#include <sys/stat.h>#include <string.h>#include <execinfo.h>#include <sys/syscall.h>#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <pwd.h>#include <fcntl.h>#include <sys/mman.h> Include dependency graph for system.c:
 Include dependency graph for system.c:Go to the source code of this file.
| Macros | |
| #define | FMT "%*s%*s" | 
| #define | MID(LEN, STR) | 
| Functions | |
| size_t | system_total_memory () | 
| 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) | 
| off_t | system_file_size (const char *file) | 
| const char * | system_exec_name () | 
| int | system_process_id () | 
| int | system_thread_id () | 
| char * | formatStackLine (const char *bt_sym, int *cwidths, char *dest) | 
| const char * | system_backtrace (unsigned int skip) | 
| Variables | |
| static char | __backtraceStr [32768] | 
| #define FMT "%*s%*s" | 
Definition at line 149 of file system.c.
Referenced by system_backtrace().
| #define MID | ( | LEN, | |
| STR ) | 
Definition at line 150 of file system.c.
Referenced by system_backtrace().
| char * formatStackLine | ( | const char * | bt_sym, | 
| int * | cwidths, | ||
| char * | dest ) | 
Definition at line 101 of file system.c.
Referenced by system_backtrace().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 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().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 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().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 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().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| char * system_home_path | ( | ) | 
Get current users home directory.
Definition at line 21 of file system.c.
Referenced by utils_config_alloc_path().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 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 filetoshm_sizebytes. | 
base and fd to figure error. Definition at line 37 of file system.c.
References fd, and system_file_size().
Referenced by _arax_init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int system_process_id | ( | ) | 
Get PID of current process
Definition at line 91 of file system.c.
Referenced by _arax_init(), and arax_exit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 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().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 152 of file system.c.
Referenced by system_backtrace().