Commit 37f3f0b6 authored by Robert Schmidt's avatar Robert Schmidt

nr-uesoftmodem: don't set priority, check for SYS_NICE

The main thread of nr-uesoftmodem (executing main()) is mostly working;
it is thus not necessary to set high priority. Instead, the threads
created with threadCreate() will receive higher priority, if possible
(as determined by the availability of SYS_NICE capability).

To inform if SYS_NICE is not present, print a warning in main().
parent 66bf27bc
......@@ -456,10 +456,6 @@ ldpc_interface_t ldpc_interface = {0}, ldpc_interface_offload = {0};
int main(int argc, char **argv)
{
int set_exe_prio = 1;
if (set_exe_prio)
set_priority(79);
start_background_system();
if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == NULL) {
......@@ -484,6 +480,10 @@ int main(int argc, char **argv)
//randominit (0);
set_taus_seed (0);
if (!has_cap_sys_nice())
LOG_W(UTIL,
"no SYS_NICE capability: cannot set thread priority and affinity, consider running with sudo for optimum performance\n");
cpuf=get_cpu_freq_GHz();
itti_init(TASK_MAX, tasks_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment