summaryrefslogtreecommitdiff
path: root/src/Data/PacketQueue.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/PacketQueue.hs')
-rw-r--r--src/Data/PacketQueue.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/PacketQueue.hs b/src/Data/PacketQueue.hs
index 4f0f04e3..144c8de0 100644
--- a/src/Data/PacketQueue.hs
+++ b/src/Data/PacketQueue.hs
@@ -37,7 +37,7 @@ data PacketQueue a = PacketQueue
37 , seqno :: TVar Word32 37 , seqno :: TVar Word32
38 , qsize :: Word32 38 , qsize :: Word32
39 , buffend :: TVar Word32 -- on incoming, highest packet number handled + 1 39 , buffend :: TVar Word32 -- on incoming, highest packet number handled + 1
40 , qOverWriteMode :: Bool 40 , qOverWriteMode :: Bool -- TODO: Remove me, use Data.CyclicBuffer instead.
41 } 41 }
42 42
43packetQueueViewList :: PacketQueue a -> STM [(Word32,a)] 43packetQueueViewList :: PacketQueue a -> STM [(Word32,a)]
@@ -102,7 +102,7 @@ dequeue PacketQueue { pktq, seqno, qsize } = do
102 modifyTVar' seqno succ 102 modifyTVar' seqno succ
103 return x 103 return x
104 104
105-- | Like dequeue, but marks as handled rather than removing 105-- | Like dequeue, but marks as viewed rather than removing
106markButNotDequeue :: PacketQueue (Bool,a) -> STM a 106markButNotDequeue :: PacketQueue (Bool,a) -> STM a
107markButNotDequeue PacketQueue { pktq, seqno, qsize } = do 107markButNotDequeue PacketQueue { pktq, seqno, qsize } = do
108 i0 <- readTVar seqno 108 i0 <- readTVar seqno