From 181cfd3379d17150b2ec610e9fd963a45d794e5e Mon Sep 17 00:00:00 2001 From: Hans-Peter Deifel <hpd@hpdeifel.de> Date: Wed, 7 Dec 2016 23:54:32 +0100 Subject: [PATCH] Don't trigger interrupts before kickoff Interrupts are disabled before kickoff in the real application, so we should not trigger them manually. --- src/CFG/C.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CFG/C.hs b/src/CFG/C.hs index f0af83b..0da3ba6 100644 --- a/src/CFG/C.hs +++ b/src/CFG/C.hs @@ -127,7 +127,7 @@ instrToC _ _ (IfThanElse left right) = do instrToC _ _ (Call ident False) = return $ ident <> "();" instrToC interrupts kind (Call ident True) = do ints <- - if kind /= KindISR + if kind /= KindISR && not (isKickoff ident) then triggerInterrupts interrupts else return mempty return $ @@ -144,3 +144,6 @@ decisionNumber = do n <- get put (n+1) return n + +isKickoff :: Ident -> Bool +isKickoff = ("kickoff" `T.isInfixOf`) -- GitLab