libCom/posix: don't memlock() if opted out of FIFO scheduling

This commit is contained in:
Ralph Lange
2025-11-10 14:56:41 +01:00
committed by Andrew Johnson
parent 862272d666
commit 0916cf985c

View File

@@ -466,7 +466,7 @@ void epicsThreadRealtimeLock(void)
mlocked = 0;
#if USE_MEMLOCK
#ifndef RTEMS_LEGACY_STACK // seems to be part of libbsd?
if (pcommonAttr->maxPriority > pcommonAttr->minPriority) {
if (pcommonAttr->maxPriority > pcommonAttr->minPriority && wantPrioScheduling) {
int status = mlockall(MCL_CURRENT | MCL_FUTURE);
if (status) {