From: Martin Quinson Date: Sat, 30 Jan 2016 23:56:26 +0000 (+0100) Subject: rename a function, and kill 2 dead prototypes X-Git-Tag: v3_13~1028 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7f3f8f529e768dc634482aa2fd40cad33ba8b496 rename a function, and kill 2 dead prototypes --- diff --git a/src/bindings/lua/lua_platf.c b/src/bindings/lua/lua_platf.c index 1462c5475f..4f7507b33c 100644 --- a/src/bindings/lua/lua_platf.c +++ b/src/bindings/lua/lua_platf.c @@ -182,7 +182,7 @@ int console_add_host(lua_State *L) { XBT_ERROR("Attribute 'speed' must be specified for host and must either be a string (in the correct format; check documentation) or a number."); } host.speed_peak = xbt_dynar_new(sizeof(double), NULL); - xbt_dynar_push_as(host.speed_peak, double, get_cpu_speed(lua_tostring(L, -1))); + xbt_dynar_push_as(host.speed_peak, double, parse_cpu_speed(lua_tostring(L, -1))); lua_pop(L, 1); // get core diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 35d321970f..6fdb314438 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -981,13 +981,10 @@ XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_link_avail; XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_link_bw; XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_link_lat; -XBT_PUBLIC(double) get_cpu_speed(const char *power); +XBT_PUBLIC(double) parse_cpu_speed(const char *str_speed); XBT_PUBLIC(xbt_dict_t) get_as_router_properties(const char* name); -int surf_get_nthreads(void); -void surf_set_nthreads(int nthreads); - /* * Returns the initial path. On Windows the initial path is * the current directory for the current process in the other diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 13002dea87..50c47f4f7d 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -443,7 +443,7 @@ void ETag_surfxml_host(void) { XBT_DEBUG("Buffer: %s", buf); host.speed_peak = xbt_dynar_new(sizeof(double), NULL); if (strchr(buf, ',') == NULL){ - double speed = get_cpu_speed(A_surfxml_host_power); + double speed = parse_cpu_speed(A_surfxml_host_power); xbt_dynar_push_as(host.speed_peak,double, speed); } else { @@ -455,7 +455,7 @@ void ETag_surfxml_host(void) { xbt_dynar_get_cpy(pstate_list, i, &speed_str); xbt_str_trim(speed_str, NULL); - speed = get_cpu_speed(speed_str); + speed = parse_cpu_speed(speed_str); xbt_dynar_push_as(host.speed_peak, double, speed); XBT_DEBUG("Speed value: %f", speed); } @@ -1061,7 +1061,7 @@ int_f_void_t surf_parse = _surf_parse; * With XML parser */ -double get_cpu_speed(const char *str_speed) +double parse_cpu_speed(const char *str_speed) { double speed = 0.0; const char *p, *q;