packages feed

bits-atomic 0.1.2 → 0.1.3

raw patch · 2 files changed

+21/−6 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Bits.Atomic: addAndFetch :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: addAndFetch :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: andAndFetch :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: andAndFetch :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: class (Bits x) => AtomicBits x
+ Data.Bits.Atomic: class Bits x => AtomicBits x
- Data.Bits.Atomic: compareAndSwap :: (AtomicBits x) => Ptr x -> x -> x -> IO x
+ Data.Bits.Atomic: compareAndSwap :: AtomicBits x => Ptr x -> x -> x -> IO x
- Data.Bits.Atomic: compareAndSwapBool :: (AtomicBits x) => Ptr x -> x -> x -> IO Bool
+ Data.Bits.Atomic: compareAndSwapBool :: AtomicBits x => Ptr x -> x -> x -> IO Bool
- Data.Bits.Atomic: fetchAndAdd :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: fetchAndAdd :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: fetchAndAnd :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: fetchAndAnd :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: fetchAndNand :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: fetchAndNand :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: fetchAndOr :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: fetchAndOr :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: fetchAndSub :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: fetchAndSub :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: fetchAndXor :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: fetchAndXor :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: lockRelease :: (AtomicBits x) => Ptr x -> IO ()
+ Data.Bits.Atomic: lockRelease :: AtomicBits x => Ptr x -> IO ()
- Data.Bits.Atomic: lockTestAndSet :: (AtomicBits x) => Ptr x -> IO x
+ Data.Bits.Atomic: lockTestAndSet :: AtomicBits x => Ptr x -> IO x
- Data.Bits.Atomic: nandAndFetch :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: nandAndFetch :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: orAndFetch :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: orAndFetch :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: subAndFetch :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: subAndFetch :: AtomicBits x => Ptr x -> x -> IO x
- Data.Bits.Atomic: xorAndFetch :: (AtomicBits x) => Ptr x -> x -> IO x
+ Data.Bits.Atomic: xorAndFetch :: AtomicBits x => Ptr x -> x -> IO x

Files

Data/Bits/Atomic.hs view
@@ -1,8 +1,8 @@ {-# LANGUAGE ForeignFunctionInterface #-} -- | Atomic bit operations, using GCC's built-in atomic operations in small C -- wrapper functions called through the FFI. See--- <http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Atomic-Builtins.html> or the--- version corresponding to your compiler for more detail.+-- <http://gcc.gnu.org/wiki/Atomic> and+-- <http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html> for more detail. module Data.Bits.Atomic (     -- * Atomic bit operations on 'Word'-sized memory locations     AtomicBits(..),
bits-atomic.cabal view
@@ -1,5 +1,5 @@ Name:               bits-atomic-Version:            0.1.2+Version:            0.1.3 License:            BSD3 License-File:       License.txt Maintainer:         Gabriel Wicke <wicke@wikidev.net>@@ -7,12 +7,24 @@ Synopsis:       Atomic bit operations on memory locations                  for low-level synchronization Description:        - Atomic operations including CAS (compare-and-swap), lock and fetch & add+ Atomic operations including CAS (compare-and-swap), fetch & add and variants  suitable for low-level shared-memory synchronization.  .- The implementation is using GCC's builtin atomic operations in C wrappers- called through the FFI.+ The implementation is using GCC's builtin atomic operations (available in GCC >=+ 4) in C wrappers called through the FFI. See these links for background:  .+ * GCC manual: <http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html>+ .+ * GCC wiki: <http://gcc.gnu.org/wiki/Atomic>+ .+ /Portability/: This package is primarily developed on a Linux system, but+ should work wherever GCC >= 4 is available. It has been confirmed as working+ on OSX. On Windows, it should work with Cygwin but currently fails for+ vanilla Haskell-Platform 2010.1.0.0 as it still packages GCC 3.x. An+ installer for updated versions of GCC is available at+ <http://www.mingw.org/> and should make this package work in connection with+ Haskell-Platform. Feedback on compatibility would be appreciated.+ .  /Testing:/ The following commands can be used to compile and run the test suite:  .     > cabal unpack bits-atomic && cd bits-atomic-* # if not yet locally available@@ -21,6 +33,9 @@     > cabal test  .  /Recent changes/:+ .+ * 0.1.3: Documentation updates, especially on portability. No functional+   changes.  .  * 0.1.2: Avoid using System.FilePath in Setup.hs to fix build failure on hackage Category:           Data, Concurrency, Foreign