this is so confusing
This commit is contained in:
parent
4415dc24e1
commit
a937b457f9
@ -186,6 +186,14 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
|
|||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
utility::printUnixErrorGeneric(CLASS_NAME, "createTask", "pthread_attr_setschedpolicy");
|
utility::printUnixErrorGeneric(CLASS_NAME, "createTask", "pthread_attr_setschedpolicy");
|
||||||
}
|
}
|
||||||
|
sched_param scheduleParams;
|
||||||
|
scheduleParams.sched_priority = priority;
|
||||||
|
status = pthread_attr_setschedparam(&attributes, &scheduleParams);
|
||||||
|
if (status != 0) {
|
||||||
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
sif::warning << "PosixThread: Setting priority failed" << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning
|
sif::warning
|
||||||
@ -195,14 +203,6 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
sched_param scheduleParams;
|
|
||||||
scheduleParams.__sched_priority = priority;
|
|
||||||
status = pthread_attr_setschedparam(&attributes, &scheduleParams);
|
|
||||||
if (status != 0) {
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
|
||||||
sif::warning << "PosixThread: Setting priority failed" << std::endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
// Set Signal Mask for suspend until startTask is called
|
// Set Signal Mask for suspend until startTask is called
|
||||||
sigset_t waitSignal;
|
sigset_t waitSignal;
|
||||||
sigemptyset(&waitSignal);
|
sigemptyset(&waitSignal);
|
||||||
|
Loading…
Reference in New Issue
Block a user