"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-softlockup.c" between
stress-ng-0.09.52.tar.xz and stress-ng-0.09.54.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.

stress-softlockup.c  (stress-ng-0.09.52.tar.xz):stress-softlockup.c  (stress-ng-0.09.54.tar.xz)
skipping to change at line 66 skipping to change at line 66
{ SCHED_RR, 0, "SCHED_RR" }, { SCHED_RR, 0, "SCHED_RR" },
#endif #endif
}; };
static sigjmp_buf jmp_env; static sigjmp_buf jmp_env;
/* /*
* stress_rlimit_handler() * stress_rlimit_handler()
* rlimit generic handler * rlimit generic handler
*/ */
static void MLOCKED_TEXT stress_rlimit_handler(int dummy) static void MLOCKED_TEXT stress_rlimit_handler(int signum)
{ {
(void)dummy; (void)signum;
g_keep_stressing_flag = 1; g_keep_stressing_flag = 1;
siglongjmp(jmp_env, 1); siglongjmp(jmp_env, 1);
} }
static int stress_softlockup(const args_t *args) static int stress_softlockup(const args_t *args)
{ {
size_t policy = 0; size_t policy = 0;
int max_prio = 0; int max_prio = 0;
bool good_policy = false; bool good_policy = false;
skipping to change at line 219 skipping to change at line 219
inc_counter(args); inc_counter(args);
/* Ensure we NEVER spin forever */ /* Ensure we NEVER spin forever */
if ((time_now() - start) > (double)timeout) if ((time_now() - start) > (double)timeout)
break; break;
} while (keep_stressing()); } while (keep_stressing());
tidy_ok: tidy_ok:
rc = EXIT_SUCCESS; rc = EXIT_SUCCESS;
tidy: tidy:
fflush(stdout); (void)fflush(stdout);
_exit(rc); _exit(rc);
} else { } else {
int status; int status;
param.sched_priority = policies[0].max_prio; param.sched_priority = policies[0].max_prio;
(void)sched_setscheduler(args->pid, policies[0].policy, &param); (void)sched_setscheduler(args->pid, policies[0].policy, &param);
(void)pause(); (void)pause();
(void)kill(pid, SIGKILL); (void)kill(pid, SIGKILL);
#if defined(HAVE_ATOMIC) #if defined(HAVE_ATOMIC)
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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