"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-thermal-zone.c" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

core-thermal-zone.c  (stress-ng-0.12.09.tar.xz):core-thermal-zone.c  (stress-ng-0.12.10.tar.xz)
skipping to change at line 219 skipping to change at line 219
* Allocate array, populate with tz_info and sort * Allocate array, populate with tz_info and sort
*/ */
tz_infos = calloc(n, sizeof(*tz_infos)); tz_infos = calloc(n, sizeof(*tz_infos));
if (!tz_infos) { if (!tz_infos) {
pr_inf("thermal zones: cannot allocate memory to sort zon es\n"); pr_inf("thermal zones: cannot allocate memory to sort zon es\n");
return; return;
} }
for (n = 0, tz_info = g_shared->tz_info; tz_info; tz_info = tz_in fo->next, n++) for (n = 0, tz_info = g_shared->tz_info; tz_info; tz_info = tz_in fo->next, n++)
tz_infos[n] = tz_info; tz_infos[n] = tz_info;
qsort(tz_infos, n, sizeof(stress_tz_info_t *), stress_tz_compare) ; qsort(tz_infos, n, sizeof(*tz_infos), stress_tz_compare);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
tz_info = tz_infos[i]; tz_info = tz_infos[i];
for (j = 0; j < ss->started_instances; j++) { for (j = 0; j < ss->started_instances; j++) {
const uint64_t temp = const uint64_t temp =
ss->stats[j]->tz.tz_stat[tz_info->index]. temperature; ss->stats[j]->tz.tz_stat[tz_info->index]. temperature;
/* Avoid crazy temperatures. e.g. > 250 C */ /* Avoid crazy temperatures. e.g. > 250 C */
if (temp <= 250000) { if (temp <= 250000) {
total += temp; total += temp;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)