SWILIB API (X75)    
Loading...
Searching...
No Matches
system.h File Reference
#include "base.h"

Go to the source code of this file.

Data Structures

struct  MUTEX
 Mutex object. More...
 

Macros

#define OS_TICK_PERIOD_US   4615
 Duration of one OS tick in microseconds.
 

Typedefs

typedef struct MUTEX MUTEX
 

Functions

int isnewSGold (void)
 Get the platform type.
 
void SUBPROC (void *callback,...)
 Run a callback in the background.
 
uint32_t GetSessionAge (void)
 Get phone uptime in the ticks (1 tick=4.615 ms).
 
static uint32_t TicksToMs (uint32_t ticks)
 Converts OS ticks to milliseconds.
 
static uint32_t TicksToSec (uint32_t ticks)
 Converts OS ticks to seconds.
 
static uint32_t TicksToUs (uint32_t ticks)
 Converts OS ticks to microseconds.
 
static uint32_t MsToTicks (uint32_t ms)
 Converts milliseconds to OS ticks.
 
static uint32_t SecToTicks (uint32_t sec)
 Converts seconds to OS ticks.
 
static uint32_t UsToTicks (uint32_t us)
 Converts microseconds to OS ticks.
 
Locking functions
void LockSched (void)
 Lock OS scheduler.
 
void UnlockSched (void)
 Unlock OS scheduler.
 
void MutexCreate (MUTEX *mtx)
 Init mutex object.
 
void MutexLock (MUTEX *mtx)
 Lock mutex.
 
void MutexLockEx (MUTEX *mtx, int flag)
 Lock mutex.
 
void MutexUnlock (MUTEX *mtx)
 Unlock mutex.
 
void MutexDestroy (MUTEX *mtx)
 Destroy mutex (free resources).
 
Elfloader functions
uint32_t GetLoaderVersion ()
 Get ELFLoader version.
 
void * AddrLibrary ()
 Address of the ElfPack function library.
 
void * LIB_TOP (void)
 Get a pointer to the loaded blib.
 
void * SHARED_TOP ()
 Get a pointer to the list of loaded shared libs.
 
char ** getBaseEnviron ()
 Get a pointer to a list of environment variables.
 
int elfclose (void *ex)
 Close ELF.
 
void kill_elf ()
 Kill current ELF (in background).
 
void kill_data (void *p, void(*func_p)(void *))
 Free data without returning to the current function.
 
Shared libs (internal API)
int _dlopen (const char *name)
 Load the dynamic shared object (.so).
 
void * _dlsym (int handle, const char *name)
 Get a pointer to the symbol from the previously loaded dynamic object.
 
int _dlclose (int handle)
 Close previously loaded dynamic object.
 
const char * _dlerror ()
 Get a string representation of the last error in _dlopen.
 
int dlclean_cache ()
 Call the garbage collector for the loaded dynamic objects.
 
CPU functions
void StartCpuUsageCount (void)
 Enable CPU usage monitor.
 
unsigned long long getCpuUsedTime_if_ena (void)
 Get CPU usage monitor value.
 
uint8_t GetCPUClock ()
 Get CPU freq.
 
uint8_t GetCPULoad ()
 Get CPU load.
 
void SetCpuClockLow (int unk)
 Set the CPU frequency to the minimum value.
 
void SetCpuClockHi (int flag)
 Set the CPU frequency to the maximum value.
 
void SetCpuClockTempHi (int unk)
 Set the CPU frequency to the maximum value.
 
Misc system functions
int * RamRandSeed ()
 Get PRNG seed value.
 
const char * RamLastStoreString ()
 Current pickoff error string.
 
const char * GSM_L1_Disable ()
 Disable GSM L1 layer (NetOff).
 
Stub functions
void loopback0 (void)
 Syscall, which is used by the phone OS, swi 0.
 
void loopback1 (void)
 Syscall, which is used by the phone OS, swi 1.
 
void loopback2 (void)
 Syscall, which is used by the phone OS, swi 2.
 
void loopback3 (void)
 Syscall, which is used by the phone OS, swi 3.
 
void loopback4 (void)
 Syscall, which is used by the phone OS, swi 4.
 
void loopback171 (void)
 Syscall, which is used by the phone OS, swi 171.