Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.cpp
Show First 20 Lines • Show All 1,352 Lines • ▼ Show 20 Lines | if (path.is_absolute()) { | ||||
return path; | return path; | ||||
} | } | ||||
return fs::absolute(path, GetDataDir(net_specific)); | return fs::absolute(path, GetDataDir(net_specific)); | ||||
} | } | ||||
void ScheduleBatchPriority() { | void ScheduleBatchPriority() { | ||||
#ifdef SCHED_BATCH | #ifdef SCHED_BATCH | ||||
const static sched_param param{}; | const static sched_param param{}; | ||||
if (pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m) != 0) { | const int rc = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m); | ||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno)); | if (rc != 0) { | ||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(rc)); | |||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
namespace util { | namespace util { | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
WinCmdLineArgs::WinCmdLineArgs() { | WinCmdLineArgs::WinCmdLineArgs() { | ||||
wchar_t **wargv = CommandLineToArgvW(GetCommandLineW(), &argc); | wchar_t **wargv = CommandLineToArgvW(GetCommandLineW(), &argc); | ||||
Show All 19 Lines |