mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-26 16:30:43 +02:00
Set nice to -20 for buffer
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
#include "jungfrau.hpp"
|
||||
#include "BufferUdpReceiver.hpp"
|
||||
|
||||
#include <sys/resource.h>
|
||||
#include <syscall.h>
|
||||
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace core_buffer;
|
||||
@@ -26,6 +30,11 @@ int main (int argc, char *argv[]) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
pid_t tid;
|
||||
tid = syscall(SYS_gettid);
|
||||
int ret = setpriority(PRIO_PROCESS, tid, -20);
|
||||
if (ret == -1) throw runtime_error("cannot set nice");
|
||||
|
||||
string device_name = string(argv[1]);
|
||||
int udp_port = atoi(argv[2]);
|
||||
string root_folder = string(argv[3]);
|
||||
|
||||
Reference in New Issue
Block a user