![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
| void | init_process (void) |
| void | set_dirout (const char *dir) |
| void | free_process () |
| double | get_usage_cpu (void) |
| int | get_cpu_avail (void) |
Obtain information about system
A few routines handles process resource.
| void init_process | ( | void | ) |
Set the HOME, TEMP, USER names.
| void set_dirout | ( | const char * | dir | ) |
Set DIROUT, the result directory, to the absolute path of dir with the build directory and HOME abbreviated.
| [in] | dir | Output directory. Uses the current directory if NULL. |
| void free_process | ( | void | ) |
Free the path strings (DIRBUILD, DIRCACHE, DIROUT, HOST, etc.) allocated by init_process(). TEMP and HOME are kept.
| double get_usage_cpu | ( | void | ) |
Obtain the current usage level of CPU, between 0 and 1.
| int get_cpu_avail | ( | void | ) |
Return number of idle CPUs that are available to run jobs. Do not count hyperthread cores.