flounder: Free popped receive slot if we did not use it
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 7 Nov 2016 09:56:43 +0000 (10:56 +0100)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 7 Nov 2016 09:56:43 +0000 (10:56 +0100)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

tools/flounder/LMP.hs

index 7e2fa0f..3caeb0c 100644 (file)
@@ -687,7 +687,11 @@ rx_handler arch ifn typedefs msgdefs msgs =
             ] [
                 C.Ex $ C.Call "lmp_chan_set_recv_slot" [chanaddr, C.Variable "nextslot" ]
             ]
-        ] [],
+        ] [
+            -- Free popped recv slot if we didn't use it!
+            C.SComment "Free the popped receive slot, if we did not use it",
+            C.Ex $ C.Call "slot_free" [ C.Variable "nextslot" ]
+        ],
         C.SBlank,
 
         C.SComment "is this the start of a new message?",