13
0

Debug thread sched_priority

This commit is contained in:
Robin Gareus 2024-09-28 14:47:52 +02:00
parent 2014faaeca
commit 1d921dec0b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -369,7 +369,7 @@ pbd_realtime_pthread_create (
if (stacksize > 0) {
pthread_attr_setstacksize (&attr, stacksize + pbd_stack_size ());
}
DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Start Realtime Thread policy = %1 priority = %2 stacksize = 0x%3%4\n", policy, priority, std::hex, stacksize));
DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Start Realtime Thread policy = %1 priority = %2 stacksize = 0x%3%4\n", policy, parm.sched_priority, std::hex, stacksize));
rv = pthread_create (thread, &attr, start_routine, arg);
pthread_attr_destroy (&attr);
return rv;
@ -382,6 +382,8 @@ pbd_set_thread_priority (pthread_t thread, const int policy, int priority)
memset (&param, 0, sizeof (param));
param.sched_priority = pbd_absolute_rt_priority (policy, priority);
DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Change '%1' to policy = %2 priority = %3\n", pthread_name(), policy, param.sched_priority));
return pthread_setschedparam (thread, SCHED_FIFO, &param);
}