packages feed

lockfree-queue 0.2.0.2 → 0.2.3

raw patch · 3 files changed

+48/−19 lines, 3 filesdep +abstract-deque-testsdep −IORefCASdep ~abstract-dequedep ~atomic-primops

Dependencies added: abstract-deque-tests

Dependencies removed: IORefCAS

Dependency ranges changed: abstract-deque, atomic-primops

Files

Data/Concurrent/Queue/MichaelScott.hs view
@@ -31,6 +31,19 @@ import qualified Data.Concurrent.Deque.Class as C import Data.Atomics (readForCAS, casIORef, Ticket, peekTicket) +-- GHC 7.8 changed some primops+#if MIN_VERSION_base(4,7,0)+import GHC.Base  hiding ((==#))+import GHC.Prim hiding ((==#))+import qualified GHC.PrimopWrappers as GPW+(==#) :: Int# -> Int# -> Bool+(==#) x y = case x GPW.==# y of { 0# -> False; _ -> True }+#else+import GHC.Base+import GHC.Prim+#endif++ -- Considering using the Queue class definition: -- import Data.MQueue.Class 
Test.hs view
@@ -5,13 +5,27 @@ module Main where import Test.Framework                     (defaultMain) import Test.Framework.Providers.HUnit     (hUnitTestToTests)-import Data.Concurrent.Deque.Tests        (tests_fifo)-import Data.Concurrent.Queue.MichaelScott (newQ)-import System.Environment (withArgs)-import Test.HUnit (Test(TestLabel))+import Data.Concurrent.Deque.Tests        (tests_fifo, numElems, getNumAgents)+import System.Environment (getArgs, withArgs)+import Test.HUnit  -main =-  withArgs ["-j1","--jxml=test-results.xml"] $ -  defaultMain$ hUnitTestToTests$-  TestLabel "MichaelScott" $-  tests_fifo newQ+-- import Data.Concurrent.Queue.MichaelScott (newQ)+import Data.Concurrent.Queue.MichaelScott (LinkedQueue)+import Data.Concurrent.Deque.Class        (newQ)+import Data.Concurrent.Deque.Debugger++main = do+  numAgents <- getNumAgents+  putStrLn$ "Running with numElems "++show numElems++" and numAgents "++ show numAgents+  putStrLn "Use NUMELEMS and +RTS to control the size of this benchmark."+  args <- getArgs+  -- Don't allow concurent tests (the tests are concurrent!):+  withArgs (args ++ ["-j1","--jxml=test-results.xml"]) $ +    defaultMain$ hUnitTestToTests$+    TestList+    [ TestLabel "MichaelScott" $ tests_fifo (newQ :: IO (LinkedQueue a))+    , TestLabel "MichaelScott(DbgWrapper)" $+        tests_fifo (newQ :: IO (DebugDeque LinkedQueue a))+    ]++  
lockfree-queue.cabal view
@@ -1,5 +1,5 @@ Name:                lockfree-queue-Version:             0.2.0.2+Version:             0.2.3 License:             BSD3 License-file:        LICENSE Author:              Ryan R. Newton@@ -8,13 +8,15 @@ Build-type:          Simple Cabal-version:       >=1.8 -Homepage: https://github.com/rrnewton/haskell-lockfree-queue/wiki+Homepage: https://github.com/rrnewton/haskell-lockfree/wiki+Bug-Reports: https://github.com/rrnewton/haskell-lockfree/issues  -- Version History: -- 0.1 -- initial version -- 0.2 -- switched to MutVar  -- 0.2.0.1 -- use ticketed CAS internally; add support for -prof mode -- 0.2.0.2 -- minor: fix for upstream change+-- 0.2.3   -- bump for upstream change  Synopsis: Michael and Scott lock-free queues. @@ -36,29 +38,29 @@   exposed-modules:   Data.Concurrent.Queue.MichaelScott,                      Data.Concurrent.Queue.MichaelScott.DequeInstance   build-depends:     base >= 4.4.0.0 && < 5,-                     ghc-prim, IORefCAS >= 0.2, abstract-deque, bytestring,-                     atomic-primops+                     ghc-prim, abstract-deque >= 0.3, bytestring,+                     atomic-primops >= 0.6   -- Build failure on GHC 7.2:   --                     queuelike   ghc-options: -O2  Source-Repository head     Type:         git-    Location:     git://github.com/rrnewton/haskell-lockfree-queue.git+    Location:     git://github.com/rrnewton/haskell-lockfree.git   Test-Suite test-lockfree-queue     type:       exitcode-stdio-1.0     main-is:    Test.hs-    build-depends: base >= 4.4.0.0 && < 5, IORefCAS >= 0.2, abstract-deque, bytestring,+    build-depends: base >= 4.4.0.0 && < 5, bytestring, +                   abstract-deque >= 0.3, abstract-deque-tests >= 0.3,                     HUnit, test-framework, test-framework-hunit,-                   ghc-prim, atomic-primops+                   ghc-prim, atomic-primops >= 0.6      ghc-options: -O2 -threaded -rtsopts      -- Debugging generated code:-    ghc-options: -keep-tmp-files -dsuppress-module-prefixes -ddump-to-file -ddump-core-stats -ddump-simpl-stats -dcore-lint -dcmm-lint-    ghc-options: -ddump-ds -ddump-simpl -ddump-stg -ddump-asm -ddump-bcos -ddump-cmm -ddump-opt-cmm -ddump-inlinings-+    -- ghc-options: -keep-tmp-files -dsuppress-module-prefixes -ddump-to-file -ddump-core-stats -ddump-simpl-stats -dcore-lint -dcmm-lint+    -- ghc-options: -ddump-ds -ddump-simpl -ddump-stg -ddump-asm -ddump-bcos -ddump-cmm -ddump-opt-cmm -ddump-inlinings   -- Executable benchmark-lockfree-queue