#include "config.h"#include <unistd.h>#include <sys/types.h>#include <sys/time.h>#include <sys/wait.h>#include <signal.h>#include <sys/resource.h>#include <errno.h>#include <string>#include <cstring>#include "error_numbers.h"#include "common_defs.h"#include "filesys.h"#include "util.h"#include "base64.h"#include "mfile.h"#include "miofile.h"#include "parse.h"

Defines | |
| #define | M_LN2 0.693147180559945309417 |
| #define | EPOCHFILETIME_SEC (11644473600.) |
| #define | TEN_MILLION 10000000. |
Functions | |
| double | dtime () |
| double | dday () |
| void | boinc_sleep (double seconds) |
| void | push_unique (string s, vector< string > &v) |
| int | boinc_calling_thread_cpu_time (double &cpu_t) |
| void | update_average (double work_start_time, double work, double half_life, double &avg, double &avg_time) |
| double | linux_cpu_time (int pid) |
| void | boinc_crash () |
| int | read_file_malloc (const char *path, char *&buf, int max_len, bool tail) |
| int | read_file_string (const char *path, string &result, int max_len, bool tail) |
| int | run_program (const char *dir, const char *file, int, char *const argv[], double nsecs, int &id) |
| void | kill_program (int pid) |
| int | get_exit_status (int pid) |
| bool | process_exists (int pid) |
| int | wait_client_mutex (const char *dir, double timeout) |
Variables | |
| const char * | BOINC_RCSID_ab65c90e1e = "$Id: util.cpp 16069 2008-09-26 18:20:24Z davea $" |
| #define EPOCHFILETIME_SEC (11644473600.) |
| #define M_LN2 0.693147180559945309417 |
| #define TEN_MILLION 10000000. |
| int boinc_calling_thread_cpu_time | ( | double & | cpu_t | ) |

| void boinc_crash | ( | ) |
| void boinc_sleep | ( | double | seconds | ) |


| double dday | ( | ) |


| double dtime | ( | ) |
| int get_exit_status | ( | int | pid | ) |
| void kill_program | ( | int | pid | ) |
| double linux_cpu_time | ( | int | pid | ) |
| bool process_exists | ( | int | pid | ) |
| void push_unique | ( | string | s, | |
| vector< string > & | v | |||
| ) |
| int read_file_malloc | ( | const char * | path, | |
| char *& | buf, | |||
| int | max_len, | |||
| bool | tail | |||
| ) |


| int read_file_string | ( | const char * | path, | |
| string & | result, | |||
| int | max_len, | |||
| bool | tail | |||
| ) |


| int run_program | ( | const char * | dir, | |
| const char * | file, | |||
| int | , | |||
| char *const | argv[], | |||
| double | nsecs, | |||
| int & | id | |||
| ) |


| void update_average | ( | double | work_start_time, | |
| double | work, | |||
| double | half_life, | |||
| double & | avg, | |||
| double & | avg_time | |||
| ) |


| int wait_client_mutex | ( | const char * | dir, | |
| double | timeout | |||
| ) |


| const char* BOINC_RCSID_ab65c90e1e = "$Id: util.cpp 16069 2008-09-26 18:20:24Z davea $" |
1.5.6