Revert "cyclictest problem/bug as non-root"
This reverts commit 64e635bc51
.
moving to the check-return-and-exit strategy
Signed-off-by: Clark Williams <williams@redhat.com>
This commit is contained in:
parent
192a3adcd4
commit
95f2842745
|
@ -33,7 +33,6 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/resource.h>
|
|
||||||
#include "rt_numa.h"
|
#include "rt_numa.h"
|
||||||
|
|
||||||
#include "rt-utils.h"
|
#include "rt-utils.h"
|
||||||
|
@ -643,10 +642,7 @@ void *timerthread(void *param)
|
||||||
|
|
||||||
memset(&schedp, 0, sizeof(schedp));
|
memset(&schedp, 0, sizeof(schedp));
|
||||||
schedp.sched_priority = par->prio;
|
schedp.sched_priority = par->prio;
|
||||||
if(sched_setscheduler(0, par->policy, &schedp) == -1){
|
sched_setscheduler(0, par->policy, &schedp);
|
||||||
fprintf(stderr,"sched_setscheduler prio %d failed\n",par->prio);
|
|
||||||
par->prio=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get current time */
|
/* Get current time */
|
||||||
clock_gettime(par->clock, &now);
|
clock_gettime(par->clock, &now);
|
||||||
|
@ -949,7 +945,6 @@ static void process_options (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
|
int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
|
||||||
struct rlimit rlim;
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
|
@ -1160,15 +1155,6 @@ static void process_options (int argc, char *argv[])
|
||||||
policy = SCHED_FIFO;
|
policy = SCHED_FIFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check against rlimit see /etc/security/limits.conf */
|
|
||||||
getrlimit(RLIMIT_RTPRIO, &rlim);
|
|
||||||
if ( priority > rlim.rlim_max){
|
|
||||||
fprintf(stderr, "defaulting realtime priority to %d\n",
|
|
||||||
(int) rlim.rlim_max);
|
|
||||||
priority = rlim.rlim_max;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ((policy == SCHED_FIFO || policy == SCHED_RR) && priority == 0) {
|
if ((policy == SCHED_FIFO || policy == SCHED_RR) && priority == 0) {
|
||||||
fprintf(stderr, "defaulting realtime priority to %d\n",
|
fprintf(stderr, "defaulting realtime priority to %d\n",
|
||||||
num_threads+1);
|
num_threads+1);
|
||||||
|
|
Loading…
Reference in New Issue