Fix ringPointerTest thread priority issue on VxWorks

Picked a priority somewhere in the middle and switch to
that for the two test subroutines that care.
This commit is contained in:
Andrew Johnson
2014-11-18 17:30:43 -06:00
parent 01c0275876
commit 09797ee7ca

View File

@@ -190,7 +190,7 @@ static void testPair(int locked)
/* give the consumer thread a slightly higher priority so that
* it can preempt us on RTOS targets. On non-RTOS targets
* we expect to be preempt'ed at some random time
* we expect to be preempted at some random time
*/
if(!epicsThreadLowestPriorityLevelAbove(myprio, &consumerprio))
testAbort("Can't run test from thread with highest priority");
@@ -234,9 +234,13 @@ static void testPair(int locked)
MAIN(ringPointerTest)
{
int prio = epicsThreadGetPrioritySelf();
testPlan(37);
testSingle();
epicsThreadSetPriority(epicsThreadGetIdSelf(), epicsThreadPriorityScanLow);
testPair(0);
testPair(1);
epicsThreadSetPriority(epicsThreadGetIdSelf(), prio);
return testDone();
}