Mir 1.0
Mir application programming interface
Hardware/OS-related routines

Macros

#define MIRKL_MACH_OS_OS2   0x00000001
 
#define MIRKL_MACH_OS_WIN   0x00000002
 
#define MIRKL_MACH_OS_UNIX   0x00000004
 
#define MIRKL_MACH_OS_LINUX   0x00000008
 
#define MIRKL_MACH_OS_DARWIN   0x00000010
 
#define MIRKL_MACH_OS_BSD   0x00000020
 
#define MIRKL_MACH_OS_FREEBSD   0x00000040
 

Functions

mirkl_uint32_t mirkl_mach_os (void)
 
char * mirkl_mach_os_name (char *str, int len)
 
int mirkl_mach_os_cpu_num (void)
 
double mirkl_mach_physmem (void)
 
int mirkl_getpid (void)
 

Detailed Description

Macro Definition Documentation

◆ MIRKL_MACH_OS_BSD

#define MIRKL_MACH_OS_BSD   0x00000020

BSD-like OS

◆ MIRKL_MACH_OS_DARWIN

#define MIRKL_MACH_OS_DARWIN   0x00000010

Mac OS, Mac OS X, macOS, ...

◆ MIRKL_MACH_OS_OS2

#define MIRKL_MACH_OS_OS2   0x00000001

Flags in returned value by mirkl_mach_os().

◆ MIRKL_MACH_OS_UNIX

#define MIRKL_MACH_OS_UNIX   0x00000004

UNIX-like OS

Function Documentation

◆ mirkl_getpid()

int mirkl_getpid ( void  )

Returns identification number of the calling process.

◆ mirkl_mach_os()

mirkl_uint32_t mirkl_mach_os ( void  )

Returns OS type as an integer with flags MIRKL_MACH_OS_...

◆ mirkl_mach_os_cpu_num()

int mirkl_mach_os_cpu_num ( void  )

Returns number of processors (cores) as reported by OS.

◆ mirkl_mach_os_name()

char * mirkl_mach_os_name ( char *  str,
int  len 
)

Writes in the input buffer string with OS name, its version, etc.

◆ mirkl_mach_physmem()

double mirkl_mach_physmem ( void  )

Returns total physical memory size in Mb as reported by OS.