}
//------------ create - destroy
-struct data_list_t *new_data(void)
+static struct data_list_t *new_data(void)
{
struct data_list_t *lib = malloc(sizeof(*lib));
lib->next = NULL;
}
}
-void free_data(struct data_list_t *lib)
+static void free_data(struct data_list_t *lib)
{
free_probe_list(lib->list);
free_data_element(lib);
static pthread_mutex_t stop_all_mutex = PTHREAD_MUTEX_INITIALIZER;
-void inline free_msg(struct msg_t *msg)
+static void inline free_msg(struct msg_t *msg)
{
free(msg);
}
to+=strlen( dstr(f) delim ); \
}
#define print_feature_0(f) print_feature(f, feature0, to, ", \n\t")
-void feature_code_str(uint64_t feature0, uint64_t feature1, char *to)
+static void feature_code_str(uint64_t feature0, uint64_t feature1, char *to)
{
print_feature_0(FL_CPU);
print_feature_0(FL_MEMORY);
//PARSE FUNCTIONS
-inline uint32_t get_avail_msg_size(struct msg_buf_t *msg)
+static inline uint32_t get_avail_msg_size(struct msg_buf_t *msg)
{
return (uint32_t)(msg->end - msg->cur_pos);
}
-inline uint32_t get_msg_cur_size(struct msg_buf_t *msg)
+static inline uint32_t get_msg_cur_size(struct msg_buf_t *msg)
{
return (uint32_t) (msg->cur_pos - msg->payload);
}
return 1;
}
-struct msg_t *gen_stop_msg(void)
+static struct msg_t *gen_stop_msg(void)
{
struct msg_t *res = malloc(sizeof(*res));
memset(res, 0, sizeof(*res));
return -(err_code != ERR_NO);
}
-int process_msg_get_screenshot(struct msg_buf_t *msg_control)
+static int process_msg_get_screenshot(struct msg_buf_t *msg_control)
{
int target_index;
int sock;
//----------------------------------- parse -----------------------------------
-int parse_us_inst_func(struct msg_buf_t *msg, struct probe_list_t **dest)
+static int parse_us_inst_func(struct msg_buf_t *msg, struct probe_list_t **dest)
{
//probe format
//name | type | len | info
return 0;
}
-int parse_func_inst_list(struct msg_buf_t *msg,
+static int parse_func_inst_list(struct msg_buf_t *msg,
struct data_list_t *dest)
{
uint32_t i = 0, num = 0;
return 1;
}
-int parse_inst_lib(struct msg_buf_t *msg, struct lib_list_t **dest)
+static int parse_inst_lib(struct msg_buf_t *msg, struct lib_list_t **dest)
{
*dest = new_lib();
if (*dest == NULL) {
return manager.apps_to_run;
}
-int kill_app_by_info(const struct app_info_t *app_info)
+static int kill_app_by_info(const struct app_info_t *app_info)
{
int res = 0;
return stat(filename, &decoy) == 0;
}
-void suffix_filename(char buf[PATH_MAX], const char *filename)
+static void suffix_filename(char buf[PATH_MAX], const char *filename)
{
char adj_filename[PATH_MAX];
sprintf(adj_filename, "%s.exe", filename);
// atexit functions
// =============================================================================
-void _close_server_socket(void)
+static void _close_server_socket(void)
{
LOGI("close_server_socket\n");
// close server socket
static unsigned long probe_so_size = 0;
-int get_file_status_no_open(int pfd, const char *filename)
+static int get_file_status_no_open(int pfd, const char *filename)
{
int status = 0;
char buf[STATUS_STRING_MAX];
// return 0 for error case
// return system total memory in MB
//static
-unsigned long get_system_total_memory()
+static unsigned long get_system_total_memory(void)
{
int meminfo_fd = manager.fd.procmeminfo;
char *head, *tail;
close(fd);
}
*/
-int get_camera_count()
+static int get_camera_count(void)
{
FILE* fp;
int count = 0;
return res;
}
-int update_cpus_info(int event_num, float elapsed)
+static int update_cpus_info(int event_num, float elapsed)
{
int i = 0;
CPU_t* cpuptr;
return 0;
}
-int fill_system_processes_info(float factor, struct system_info_t * sys_info)
+static int fill_system_processes_info(float factor, struct system_info_t * sys_info)
{
procNode* proc;
int i = 0;
}
// fill threads information
-int fill_system_threads_info(float factor, struct system_info_t * sys_info)
+static int fill_system_threads_info(float factor, struct system_info_t * sys_info)
{
procNode* proc;
float thread_load;
}
//fill system cpu information
-int fill_system_cpu_info(struct system_info_t *sys_info)
+static int fill_system_cpu_info(struct system_info_t *sys_info)
{
float sys_usage = 0.0f;
int i = 0;
return 0;
}
-//static
-void* samplingThread(void* data)
+static void *samplingThread(void *data)
{
int err, signo;
sigset_t waitsigmask;
return status;
}
-pid_t get_pid_by_path(const char *binary_path)
+static pid_t get_pid_by_path(const char *binary_path)
{
pid_t pkg_pid;
int len;