File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -371,7 +371,9 @@ s32 LWP_SetThreadPriority(lwp_t thethread,u8 prio)
371371
372372 old_prio = __lwp_priofromcore (lwp_thread -> real_prio );
373373 lwp_thread -> real_prio = __lwp_priotocore (prio );
374- __lwp_thread_changepriority (lwp_thread ,lwp_thread -> real_prio ,TRUE);
374+
375+ if (lwp_thread -> res_cnt == 0 || lwp_thread -> cur_prio > lwp_thread -> real_prio )
376+ __lwp_thread_changepriority (lwp_thread ,lwp_thread -> real_prio ,TRUE);
375377 __lwp_thread_dispatchenable ();
376378
377379 return old_prio ;
Original file line number Diff line number Diff line change 2727
2828mutex.c -- Thread subsystem III
2929
30- Copyright (C) 2004 - 2025
30+ Copyright (C) 2004 - 2026
3131Michael Wiedenbauer (shagkur)
3232Dave Murphy (WinterMute)
3333Extrems' Corner.org
@@ -149,7 +149,7 @@ s32 LWP_MutexInit(mutex_t *mutex,bool use_recursive)
149149 ret = __lwp_mutex_allocate ();
150150 if (!ret ) return EAGAIN ;
151151
152- attr .mode = LWP_MUTEX_FIFO ;
152+ attr .mode = LWP_MUTEX_INHERITPRIO ;
153153 attr .nest_behavior = (use_recursive )?LWP_MUTEX_NEST_ACQUIRE :LWP_MUTEX_NEST_ERROR ;
154154 attr .onlyownerrelease = TRUE;
155155 attr .prioceil = LWP_PRIO_MIN + 1 ;
You can’t perform that action at this time.
0 commit comments