Create runloop_get_system_info/runloop_free_system_info/runloop_init_system_info

This commit is contained in:
twinaphex 2016-05-12 09:25:52 +02:00
parent c1bfe795f8
commit 35bf38e05c
18 changed files with 110 additions and 97 deletions

View File

@ -733,7 +733,7 @@ static void command_event_disk_control_set_eject(bool new_state, bool print_log)
rarch_system_info_t *info = NULL; rarch_system_info_t *info = NULL;
const struct retro_disk_control_callback *control = NULL; const struct retro_disk_control_callback *control = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (info) if (info)
control = (const struct retro_disk_control_callback*)&info->disk_control_cb; control = (const struct retro_disk_control_callback*)&info->disk_control_cb;
@ -781,7 +781,7 @@ static void command_event_disk_control_set_index(unsigned idx)
rarch_system_info_t *info = NULL; rarch_system_info_t *info = NULL;
const struct retro_disk_control_callback *control = NULL; const struct retro_disk_control_callback *control = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (info) if (info)
control = (const struct retro_disk_control_callback*)&info->disk_control_cb; control = (const struct retro_disk_control_callback*)&info->disk_control_cb;
@ -838,7 +838,7 @@ static bool command_event_disk_control_append_image(const char *path)
const struct retro_disk_control_callback *control = NULL; const struct retro_disk_control_callback *control = NULL;
rarch_system_info_t *sysinfo = NULL; rarch_system_info_t *sysinfo = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &sysinfo); runloop_get_system_info((void**)&info);
if (sysinfo) if (sysinfo)
control = (const struct retro_disk_control_callback*) control = (const struct retro_disk_control_callback*)
@ -983,7 +983,7 @@ static void command_event_init_controllers(void)
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *info = NULL; rarch_system_info_t *info = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
for (i = 0; i < MAX_USERS; i++) for (i = 0; i < MAX_USERS; i++)
{ {
@ -1236,7 +1236,7 @@ static bool command_event_init_core(enum rarch_core_type *data)
if (!core_init_symbols(data)) if (!core_init_symbols(data))
return false; return false;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_INIT, NULL); runloop_get_system_info((void**)&info);
/* auto overrides: apply overrides */ /* auto overrides: apply overrides */
if(settings->auto_overrides_enable) if(settings->auto_overrides_enable)
@ -1591,7 +1591,7 @@ bool command_event(enum event_command cmd, void *data)
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *info = NULL; rarch_system_info_t *info = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
(void)i; (void)i;

View File

@ -1965,7 +1965,7 @@ bool config_load_override(void)
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (system) if (system)
core_name = system->info.library_name; core_name = system->info.library_name;
@ -2143,7 +2143,7 @@ bool config_load_remap(void)
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (system) if (system)
core_name = system->info.library_name; core_name = system->info.library_name;

View File

@ -1329,7 +1329,7 @@ static bool load_content_from_compressed_archive(
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *sys_info= NULL; rarch_system_info_t *sys_info= NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &sys_info); runloop_get_system_info((void**)sys_info);
if (sys_info && sys_info->info.block_extract) if (sys_info && sys_info->info.block_extract)
return true; return true;
@ -1648,7 +1648,7 @@ static bool content_file_init(struct string_list *temporary_content)
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)system);
if (*global->subsystem) if (*global->subsystem)
{ {

View File

@ -578,7 +578,9 @@ void uninit_libretro_sym(struct retro_core_t *current_core)
memset(current_core, 0, sizeof(struct retro_core_t)); memset(current_core, 0, sizeof(struct retro_core_t));
runloop_ctl(RUNLOOP_CTL_CORE_OPTIONS_DEINIT, NULL); runloop_ctl(RUNLOOP_CTL_CORE_OPTIONS_DEINIT, NULL);
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_FREE, NULL);
runloop_free_system_info();
runloop_ctl(RUNLOOP_CTL_FRAME_TIME_FREE, NULL); runloop_ctl(RUNLOOP_CTL_FRAME_TIME_FREE, NULL);
camera_driver_ctl(RARCH_CAMERA_CTL_UNSET_ACTIVE, NULL); camera_driver_ctl(RARCH_CAMERA_CTL_UNSET_ACTIVE, NULL);
location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL); location_driver_ctl(RARCH_LOCATION_CTL_UNSET_ACTIVE, NULL);
@ -740,7 +742,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (ignore_environment_cb) if (ignore_environment_cb)
return false; return false;

View File

@ -130,7 +130,7 @@ int rarch_main(int argc, char *argv[], void *data)
return 0; return 0;
} }
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
if (content_is_inited() || content_does_not_need_content()) if (content_is_inited() || content_does_not_need_content())

View File

@ -598,7 +598,7 @@ static bool init_video(void)
struct retro_system_av_info *av_info = struct retro_system_av_info *av_info =
video_viewport_get_system_av_info(); video_viewport_get_system_av_info();
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
init_video_filter(video_driver_state.pix_fmt); init_video_filter(video_driver_state.pix_fmt);
command_event(CMD_EVENT_SHADER_DIR_INIT, NULL); command_event(CMD_EVENT_SHADER_DIR_INIT, NULL);

View File

@ -203,7 +203,7 @@ void init_location(void)
{ {
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
/* Resource leaks will follow if location interface is initialized twice. */ /* Resource leaks will follow if location interface is initialized twice. */
if (location_data) if (location_data)
@ -227,7 +227,7 @@ static void uninit_location(void)
{ {
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (location_data && location_driver) if (location_data && location_driver)
{ {

View File

@ -345,7 +345,8 @@ static int general_push(menu_displaylist_info_t *info,
core_info_get_list(&list); core_info_get_list(&list);
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system_menu); menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system_menu);
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
runloop_get_system_info((void**)&system);
switch (id) switch (id)
{ {

View File

@ -778,7 +778,8 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
struct retro_disk_control_callback *control = NULL; struct retro_disk_control_callback *control = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!system) if (!system)
return; return;
@ -1164,7 +1165,8 @@ static void menu_action_setting_disp_set_label_core_option_create(
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!system) if (!system)
return; return;

View File

@ -1013,7 +1013,7 @@ static int generic_action_ok_remap_file_save(const char *path,
const char *game_name = NULL; const char *game_name = NULL;
const char *core_name = NULL; const char *core_name = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (info) if (info)
core_name = info->info.library_name; core_name = info->info.library_name;

View File

@ -685,7 +685,7 @@ static int mui_get_core_title(char *s, size_t len)
core_name = system->library_name; core_name = system->library_name;
core_version = system->library_version; core_version = system->library_version;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (!settings->menu.core_enable) if (!settings->menu.core_enable)
return -1; return -1;

View File

@ -2157,7 +2157,7 @@ static int menu_displaylist_parse_load_content_settings(
{ {
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
menu_entries_add(info->list, menu_entries_add(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_RESUME_CONTENT), menu_hash_to_str(MENU_LABEL_VALUE_RESUME_CONTENT),
@ -2518,7 +2518,7 @@ static int menu_displaylist_parse_options_remappings(
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
return -1; return -1;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
for (p = 0; p < settings->input.max_users; p++) for (p = 0; p < settings->input.max_users; p++)
{ {
@ -3326,7 +3326,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
case DISPLAYLIST_MAIN_MENU: case DISPLAYLIST_MAIN_MENU:
{ {
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
menu_displaylist_parse_settings(menu, info, menu_displaylist_parse_settings(menu, info,

View File

@ -448,7 +448,7 @@ int menu_entries_get_core_title(char *s, size_t len)
core_name = system->library_name; core_name = system->library_name;
core_version = system->library_version; core_version = system->library_version;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (!settings->menu.core_enable) if (!settings->menu.core_enable)
return -1; return -1;

View File

@ -1068,7 +1068,7 @@ static void setting_get_string_representation_uint_libretro_device(void *data,
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!setting) if (!setting)
return; return;
@ -2290,7 +2290,7 @@ static int setting_action_start_libretro_device_type(void *data)
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (setting_generic_action_start_default(setting) != 0) if (setting_generic_action_start_default(setting) != 0)
return -1; return -1;
@ -2440,7 +2440,7 @@ static int setting_action_left_libretro_device_type(
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!setting) if (!setting)
return -1; return -1;
@ -2505,7 +2505,7 @@ static int setting_action_right_libretro_device_type(
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!setting) if (!setting)
return -1; return -1;
@ -2888,7 +2888,7 @@ void general_write_handler(void *data)
uint32_t hash = setting ? menu_hash_calculate(setting->name) : 0; uint32_t hash = setting ? menu_hash_calculate(setting->name) : 0;
uint64_t flags = menu_setting_get_flags(setting); uint64_t flags = menu_setting_get_flags(setting);
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
if (!setting) if (!setting)
return; return;
@ -3238,7 +3238,7 @@ static bool setting_append_list_input_player_options(
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest; (user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
rarch_system_info_t *system = NULL; rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&system);
snprintf(buffer[user], sizeof(buffer[user]), snprintf(buffer[user], sizeof(buffer[user]),
"%s %u", menu_hash_to_str(MENU_VALUE_USER), user + 1); "%s %u", menu_hash_to_str(MENU_VALUE_USER), user + 1);

View File

@ -169,7 +169,7 @@ uint32_t np_impl_magic(void)
api = api_info.version; api = api_info.version;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (info) if (info)
lib = info->info.library_name; lib = info->info.library_name;

View File

@ -412,7 +412,8 @@ static void retroarch_set_paths_redirect(const char *path)
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *info = NULL; rarch_system_info_t *info = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info); runloop_get_system_info((void**)&info);
if (!global) if (!global)
{ {
RARCH_WARN("retroarch_set_paths_redirect was sent a NULL \"global\" pointer."); RARCH_WARN("retroarch_set_paths_redirect was sent a NULL \"global\" pointer.");
@ -1066,9 +1067,9 @@ static void retroarch_parse_input(int argc, char *argv[])
static void retroarch_init_savefile_paths(void) static void retroarch_init_savefile_paths(void)
{ {
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *info = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&info);
command_event(CMD_EVENT_SAVEFILES_DEINIT, NULL); command_event(CMD_EVENT_SAVEFILES_DEINIT, NULL);
@ -1080,14 +1081,15 @@ static void retroarch_init_savefile_paths(void)
/* For subsystems, we know exactly which RAM types are supported. */ /* For subsystems, we know exactly which RAM types are supported. */
unsigned i, j; unsigned i, j;
const struct retro_subsystem_info *info = const struct retro_subsystem_info *subsystem_info =
libretro_find_subsystem_info( libretro_find_subsystem_info(
system->subsystem.data, info->subsystem.data,
system->subsystem.size, info->subsystem.size,
global->subsystem); global->subsystem);
/* We'll handle this error gracefully later. */ /* We'll handle this error gracefully later. */
unsigned num_content = MIN(info ? info->num_roms : 0, unsigned num_content = MIN(info
? subsystem_info->num_roms : 0,
global->subsystem_fullpaths ? global->subsystem_fullpaths ?
global->subsystem_fullpaths->size : 0); global->subsystem_fullpaths->size : 0);
@ -1095,14 +1097,14 @@ static void retroarch_init_savefile_paths(void)
for (i = 0; i < num_content; i++) for (i = 0; i < num_content; i++)
{ {
for (j = 0; j < info->roms[i].num_memory; j++) for (j = 0; j < subsystem_info->roms[i].num_memory; j++)
{ {
union string_list_elem_attr attr; union string_list_elem_attr attr;
char path[PATH_MAX_LENGTH] = {0}; char path[PATH_MAX_LENGTH] = {0};
char ext[32] = {0}; char ext[32] = {0};
const struct retro_subsystem_memory_info *mem = const struct retro_subsystem_memory_info *mem =
(const struct retro_subsystem_memory_info*) (const struct retro_subsystem_memory_info*)
&info->roms[i].memory[j]; &subsystem_info->roms[i].memory[j];
snprintf(ext, sizeof(ext), ".%s", mem->extension); snprintf(ext, sizeof(ext), ".%s", mem->extension);
@ -1172,12 +1174,12 @@ bool retroarch_validate_game_options(char *s, size_t len, bool mkdir)
const char *game_name = NULL; const char *game_name = NULL;
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL; rarch_system_info_t *info = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); runloop_get_system_info((void**)&info);
if (system) if (info)
core_name = system->info.library_name; core_name = info->info.library_name;
if (global) if (global)
game_name = path_basename(global->name.base); game_name = path_basename(global->name.base);

View File

@ -740,18 +740,17 @@ bool runloop_prepare_dummy(void)
return true; return true;
} }
bool runloop_ctl(enum runloop_ctl_state state, void *data) bool runloop_get_system_info(void **data)
{ {
settings_t *settings = config_get_ptr(); rarch_system_info_t **system = (rarch_system_info_t**)data;
if (!system)
return false;
*system = &runloop_system;
return true;
}
switch (state) void runloop_init_system_info(void)
{ {
case RUNLOOP_CTL_SHADER_DIR_DEINIT:
shader_dir_free(&runloop_shader_dir);
break;
case RUNLOOP_CTL_SHADER_DIR_INIT:
return shader_dir_init(&runloop_shader_dir);
case RUNLOOP_CTL_SYSTEM_INFO_INIT:
core_get_system_info(&runloop_system.info); core_get_system_info(&runloop_system.info);
if (!runloop_system.info.library_name) if (!runloop_system.info.library_name)
@ -765,35 +764,10 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
runloop_system.info.valid_extensions ? runloop_system.info.valid_extensions ?
runloop_system.info.valid_extensions : DEFAULT_EXT, runloop_system.info.valid_extensions : DEFAULT_EXT,
sizeof(runloop_system.valid_extensions)); sizeof(runloop_system.valid_extensions));
break;
case RUNLOOP_CTL_GET_CORE_OPTION_SIZE:
{
unsigned *idx = (unsigned*)data;
if (!idx)
return false;
*idx = core_option_manager_size(runloop_core_options);
} }
break;
case RUNLOOP_CTL_HAS_CORE_OPTIONS:
return runloop_core_options;
case RUNLOOP_CTL_COREOPTS_GET:
{
core_option_manager_t **coreopts = (core_option_manager_t**)data;
if (!coreopts)
return false;
*coreopts = runloop_core_options;
}
break;
case RUNLOOP_CTL_SYSTEM_INFO_GET:
{
rarch_system_info_t **system = (rarch_system_info_t**)data;
if (!system)
return false;
*system = &runloop_system;
}
break;
case RUNLOOP_CTL_SYSTEM_INFO_FREE:
void runloop_free_system_info(void)
{
/* No longer valid. */ /* No longer valid. */
if (runloop_system.subsystem.data) if (runloop_system.subsystem.data)
free(runloop_system.subsystem.data); free(runloop_system.subsystem.data);
@ -815,6 +789,36 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
audio_driver_unset_callback(); audio_driver_unset_callback();
memset(&runloop_system, 0, sizeof(rarch_system_info_t)); memset(&runloop_system, 0, sizeof(rarch_system_info_t));
}
bool runloop_ctl(enum runloop_ctl_state state, void *data)
{
settings_t *settings = config_get_ptr();
switch (state)
{
case RUNLOOP_CTL_SHADER_DIR_DEINIT:
shader_dir_free(&runloop_shader_dir);
break;
case RUNLOOP_CTL_SHADER_DIR_INIT:
return shader_dir_init(&runloop_shader_dir);
case RUNLOOP_CTL_GET_CORE_OPTION_SIZE:
{
unsigned *idx = (unsigned*)data;
if (!idx)
return false;
*idx = core_option_manager_size(runloop_core_options);
}
break;
case RUNLOOP_CTL_HAS_CORE_OPTIONS:
return runloop_core_options;
case RUNLOOP_CTL_COREOPTS_GET:
{
core_option_manager_t **coreopts = (core_option_manager_t**)data;
if (!coreopts)
return false;
*coreopts = runloop_core_options;
}
break; break;
case RUNLOOP_CTL_SET_FRAME_TIME_LAST: case RUNLOOP_CTL_SET_FRAME_TIME_LAST:
runloop_frame_time_last_enable = true; runloop_frame_time_last_enable = true;

View File

@ -99,10 +99,7 @@ enum runloop_ctl_state
RUNLOOP_CTL_CORE_OPTIONS_DEINIT, RUNLOOP_CTL_CORE_OPTIONS_DEINIT,
RUNLOOP_CTL_CORE_OPTIONS_FREE, RUNLOOP_CTL_CORE_OPTIONS_FREE,
RUNLOOP_CTL_SHADER_DIR_DEINIT, RUNLOOP_CTL_SHADER_DIR_DEINIT,
RUNLOOP_CTL_SHADER_DIR_INIT, RUNLOOP_CTL_SHADER_DIR_INIT
RUNLOOP_CTL_SYSTEM_INFO_GET,
RUNLOOP_CTL_SYSTEM_INFO_INIT,
RUNLOOP_CTL_SYSTEM_INFO_FREE
}; };
typedef int (*transfer_cb_t)(void *data, size_t len); typedef int (*transfer_cb_t)(void *data, size_t len);
@ -296,8 +293,13 @@ char* runloop_msg_queue_pull(void);
bool runloop_prepare_dummy(void); bool runloop_prepare_dummy(void);
bool runloop_ctl(enum runloop_ctl_state state, void *data); void runloop_init_system_info(void);
void runloop_free_system_info(void);
bool runloop_get_system_info(void **data);
bool runloop_ctl(enum runloop_ctl_state state, void *data);
#ifdef __cplusplus #ifdef __cplusplus
} }