Do not modify IRQ priority under non-rt kernel
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 18 Jun 2009 14:57:47 +0000 (16:57 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 18 Jun 2009 14:57:47 +0000 (16:57 +0200)
tests/_lib.sh

index 183f189..4dbbc40 100644 (file)
@@ -14,10 +14,11 @@ PATH=$PWD/../_compiled/bin/:$PATH
 RTPRIO=60
 
 boost_irq_prio() {
-    local P=${1:-50}
+    local PRIO=${1:-50}
     CAN_IRQ=`sed -ne '/can/ s/:.*//p' /proc/interrupts`
     if [ -n "$CAN_IRQ" ]; then
-       schedtool -F -p $P `pidof IRQ-${CAN_IRQ/ /}`
+       IRQ_PID=`pidof IRQ-${CAN_IRQ/ /}` || true
+       [ -z "$IRQ_PID" ] || schedtool -F -p $PRIO $IRQ_PID 
     fi
 }