fcntl(new, F_SETFD, fcntl(new, F_GETFD) | FD_CLOEXEC);
}
-void initialize_log()
+void initialize_log(void)
{
int fd = open(DEBUG_LOGFILE, O_WRONLY | O_CREAT | O_TRUNC, 0777);
if (fd > 0) {
}
#else
-void initialize_log()
+void initialize_log(void)
{
}
#endif
}
//------------ create - destroy
-struct data_list_t *new_data()
+struct data_list_t *new_data(void)
{
struct data_list_t *lib = malloc(sizeof(*lib));
lib->next = NULL;
return lib;
}
-struct lib_list_t *new_lib()
+struct lib_list_t *new_lib(void)
{
struct lib_list_t *lib = (struct lib_list_t *)new_data();
lib->lib = malloc(sizeof(*lib->lib));
return lib;
}
-struct app_list_t *new_app()
+struct app_list_t *new_app(void)
{
struct app_list_t *app = (struct app_list_t *)new_data();
app->app = malloc(sizeof(*app->app));
return app;
}
-struct probe_list_t *new_probe()
+struct probe_list_t *new_probe(void)
{
struct probe_list_t *probe = malloc(sizeof(*probe));
probe->next = NULL;
extern int msg_start(struct msg_buf_t *data, struct user_space_inst_t *us_inst,
struct msg_t **msg, enum ErrorCode *err);
-struct probe_list_t *new_probe();
-struct lib_list_t *new_lib();
-struct app_list_t *new_app();
+struct probe_list_t *new_probe(void);
+struct lib_list_t *new_lib(void);
+struct app_list_t *new_app(void);
int probe_list_append(struct data_list_t *to, struct probe_list_t *from);
int data_list_append(struct data_list_t **to, struct data_list_t *from);
void free_data_list(struct data_list_t **data);
#define MAX_APP_LAUNCH_TIME 60
#define MAX_CONNECT_TIMEOUT_TIME 5*60
-uint64_t get_total_alloc_size()
+uint64_t get_total_alloc_size(void)
{
int i;
uint64_t allocsize = 0;
return ECORE_CALLBACK_CANCEL;
}
-int launch_timer_start()
+static int launch_timer_start(void)
{
int res = 0;
return res;
}
-int prepare_profiling()
+int prepare_profiling(void)
{
struct app_list_t *app = NULL;
const struct app_info_t *app_info = NULL;
}
-int start_profiling()
+int start_profiling(void)
{
struct app_list_t *app = NULL;
const struct app_info_t *app_info = NULL;
}
// return 0 for normal case
-int daemonLoop()
+int daemonLoop(void)
{
int return_value = 0;
extern __da_manager manager;
-void initialize_log();
-int daemonLoop();
-uint64_t get_total_alloc_size();
+uint64_t get_total_alloc_size(void);
+void initialize_log(void);
+int daemonLoop(void);
void unlink_portfile(void);
int makeRecvThread(int index);
-int samplingStart();
-int samplingStop();
+int samplingStart(void);
+int samplingStop(void);
// TODO maybe need move to other file
-int prepare_profiling();
-int start_profiling();
-void stop_profiling();
+int prepare_profiling(void);
+int start_profiling(void);
+void stop_profiling(void);
int reconfigure();
int sendACKCodeToHost(enum HostMessageType resp, int msgcode);
-void terminate_all();
+void terminate_all(void);
#ifdef __cplusplus
}
return -1;
}
-int initialize_system_info()
+int initialize_system_info(void)
{
int i;
return 0;
}
-int finalize_system_info()
+int finalize_system_info(void)
{
int i;
#define str(x) strr(x)
#define dtest_and_close(fd) do {LOGI("CLOSE " str(fd) "\n");test_and_close(fd);} while(0)
#define dftest_and_close(fd) do {LOGI("CLOSE " str(fd) "\n");ftest_and_close(fd);} while(0)
-void close_system_file_descriptors()
+void close_system_file_descriptors(void)
{
dtest_and_close(&manager.fd.brightness);
dtest_and_close(&manager.fd.voltage);
dftest_and_close(&manager.fd.diskstats);
}
-int init_system_file_descriptors()
+int init_system_file_descriptors(void)
{
//inits
init_brightness_status();
int get_file_status(int* pfd, const char* filename);
-int initialize_system_info();
+int initialize_system_info(void);
-int finalize_system_info();
+int finalize_system_info(void);
int fill_target_info(struct target_info_t *target_info);
-int init_system_file_descriptors();
-void close_system_file_descriptors();
+int init_system_file_descriptors(void);
+void close_system_file_descriptors(void);
int sys_stat_prepare(void);
#ifdef __cplusplus
}
// return 0 if normal case
// return minus value if critical error
// return plus value if non-critical error
-int samplingStart()
+int samplingStart(void)
{
struct itimerval timerval;
time_t sec = prof_session.conf.system_trace_period / 1000;
return 0;
}
-int samplingStop()
+int samplingStop(void)
{
if(manager.sampling_thread != -1)
{
return NULL;
}
-int start_transfer()
+int start_transfer(void)
{
int saved_flags;
return 0;
}
-void stop_transfer()
+void stop_transfer(void)
{
int saved_flags;
int ret = 0;
#ifndef _TRANSFER_THREAD_
#define _TRANSFER_THREAD_
-int start_transfer();
-void stop_transfer();
+int start_transfer(void);
+void stop_transfer(void);
#endif /* _TRANSFER_THREAD_ */