aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/threading.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/threading.c b/src/threading.c
index 2b68503..2464d03 100644
--- a/src/threading.c
+++ b/src/threading.c
@@ -779,8 +779,8 @@ void THREAD_CREATE( THREAD_T* ref, THREAD_RETURN_T (*func)( void*), void* data,
779{ 779{
780 pthread_attr_t a; 780 pthread_attr_t a;
781 bool_t const change_priority = 781 bool_t const change_priority =
782#if defined(PLATFORM_LINUX) && defined(LINUX_SCHED_RR) 782#ifdef PLATFORM_LINUX
783 sudo && // with sudo, even normal thread must use SCHED_RR 783 sudo && // only root-privileged process can change priorities
784#endif 784#endif
785 (prio != THREAD_PRIO_DEFAULT); 785 (prio != THREAD_PRIO_DEFAULT);
786 786
@@ -887,9 +887,9 @@ void THREAD_CREATE( THREAD_T* ref, THREAD_RETURN_T (*func)( void*), void* data,
887 887
888void THREAD_SET_PRIORITY( int prio) 888void THREAD_SET_PRIORITY( int prio)
889{ 889{
890#if defined PLATFORM_LINUX && defined LINUX_SCHED_RR 890#ifdef PLATFORM_LINUX
891 if( sudo) // only root-privileged process can change priorities 891 if( sudo) // only root-privileged process can change priorities
892#endif // defined PLATFORM_LINUX && defined LINUX_SCHED_RR 892#endif // PLATFORM_LINUX
893 { 893 {
894 struct sched_param sp; 894 struct sched_param sp;
895 // prio range [-3,+3] was checked by the caller 895 // prio range [-3,+3] was checked by the caller