Remove Check if fedora and inside kernel
It's completely unclear what this is supposed to do.
This commit is contained in:
@@ -95,17 +95,6 @@ static void read_pipe(int p, char *b, int size) {
|
||||
size -= ret;
|
||||
}
|
||||
}
|
||||
int checkIfFedoraDistribution(void) {
|
||||
return !system("grep -iq 'ID_LIKE.*fedora' /etc/os-release ");
|
||||
}
|
||||
|
||||
int checkIfGenericKernelOnFedora(void) {
|
||||
return system("uname -a | grep -q rt");
|
||||
}
|
||||
|
||||
int checkIfInsideContainer(void) {
|
||||
return !system("egrep -q 'libpod|podman|kubepods' /proc/self/cgroup");
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/* background process */
|
||||
@@ -234,11 +223,6 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
|
||||
|
||||
LOG_I(UTIL,"Creating thread %s with affinity %d and priority %d\n",name,affinity,priority);
|
||||
|
||||
if (checkIfFedoraDistribution())
|
||||
if (checkIfGenericKernelOnFedora())
|
||||
if (checkIfInsideContainer())
|
||||
settingPriority = 0;
|
||||
|
||||
if (settingPriority) {
|
||||
ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||
AssertFatal(ret == 0, "Error in pthread_attr_setinheritsched(): ret: %d, errno: %d\n", ret, errno);
|
||||
@@ -314,11 +298,6 @@ void thread_top_init(char *thread_name,
|
||||
}
|
||||
}
|
||||
|
||||
if (checkIfFedoraDistribution())
|
||||
if (checkIfGenericKernelOnFedora())
|
||||
if (checkIfInsideContainer())
|
||||
settingPriority = 0;
|
||||
|
||||
if (settingPriority) {
|
||||
memset(&sparam, 0, sizeof(sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
|
||||
|
||||
@@ -61,9 +61,6 @@ void thread_top_init(char *thread_name,
|
||||
* Functions to check system at runtime.
|
||||
****************************************************/
|
||||
|
||||
int checkIfFedoraDistribution(void);
|
||||
int checkIfGenericKernelOnFedora(void);
|
||||
int checkIfInsideContainer(void);
|
||||
int rt_sleep_ns (uint64_t x);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user