From 09797ee7ca464aef500a0bae1bf05841e6ee0a33 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 18 Nov 2014 17:30:43 -0600 Subject: [PATCH] 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. --- src/libCom/test/ringPointerTest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libCom/test/ringPointerTest.c b/src/libCom/test/ringPointerTest.c index 2a5518e9d..92401d123 100644 --- a/src/libCom/test/ringPointerTest.c +++ b/src/libCom/test/ringPointerTest.c @@ -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(); }