From 3c312d109691e7857580bb72e8d77d6f94bfbc3b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 3 Sep 2024 11:39:30 +0200 Subject: [PATCH] Fix setPriority error messages --- src/libYARP_os/src/yarp/os/impl/ThreadImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libYARP_os/src/yarp/os/impl/ThreadImpl.cpp b/src/libYARP_os/src/yarp/os/impl/ThreadImpl.cpp index 8d1e2d1b5a..74b1223f75 100644 --- a/src/libYARP_os/src/yarp/os/impl/ThreadImpl.cpp +++ b/src/libYARP_os/src/yarp/os/impl/ThreadImpl.cpp @@ -257,7 +257,7 @@ int ThreadImpl::setPriority(int priority, int policy) if (std::is_same::value) { return ACE_Thread::setprio(thread.native_handle(), priority, policy); } - yCError(THREADIMPL, "Cannot set priority without ACE"); + yCError(THREADIMPL, "Cannot set priority as std::thread::native_handle_type is not ACE_hthread_t"); #elif defined(__unix__) || defined(__APPLE__) if (std::is_same::value) { struct sched_param thread_param; @@ -265,7 +265,7 @@ int ThreadImpl::setPriority(int priority, int policy) int ret = pthread_setschedparam(thread.native_handle(), policy, &thread_param); return (ret != 0) ? -1 : 0; } else { - yCError(THREADIMPL, "Cannot set priority without ACE"); + yCError(THREADIMPL, "Cannot set priority as std::thread::native_handle_type is not pthread_t"); } #else yCError(THREADIMPL, "Cannot set priority without ACE");