bits-extras 0.1.0 → 0.1.1
raw patch · 2 files changed
+28/−27 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/Bits/Atomic.hs +0/−5
- bits-extras.cabal +28/−22
Data/Bits/Atomic.hs view
@@ -3,11 +3,6 @@ -- 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.------ The C code dynamically links to @libgcc_s@, which can cause problems in--- GHCi. GHCi does not currently support sonames and tries to open--- @libgcc_s.so@ while ignoring e.g. @libgcc_s.so.1@. A possible workaround--- for GHCi on a linux system: @ln -s \/lib\/libgcc_s.so.1 \/lib\/libgcc_s.so@ module Data.Bits.Atomic ( -- * Atomic bit operations on 'Word'-sized memory locations AtomicBits(..),
bits-extras.cabal view
@@ -1,30 +1,34 @@ Name: bits-extras-Version: 0.1.0+Version: 0.1.1 License: BSD3 License-File: License.txt Maintainer: Gabriel Wicke <wicke@wikidev.net> Author: Gabriel Wicke <wicke@wikidev.net> Synopsis: Efficient atomic and non-atomic bit operations not found in Data.Bits-Description: Mostly wraps low-level bit operations provided by GCC- builtins, which translate to specialized instructions- where available. - .- Atomic operations include CAS- (compare-and-swap), lock, fetch & add and similar- primitives suitable for low-level shared-memory- synchronization.- .- Primitives from the 'Extras' subpackage would be useful to- have in the proper 'Data.Bits' package, although this- would probably require broader support across different- compiler backends.- .- Relevant Hackage tickets:- .- * <http://hackage.haskell.org/trac/ghc/ticket/3563>- .- * <http://hackage.haskell.org/trac/ghc/ticket/4102>-Category: Data+Description: + Mostly wraps low-level bit operations provided by GCC builtins, which+ translate to specialized instructions where available. + .+ Atomic operations include CAS (compare-and-swap), lock, fetch & add and+ similar primitives suitable for low-level shared-memory synchronization.+ .+ Primitives from the 'Extras' subpackage would be useful to have in the proper+ 'Data.Bits' package, although this would probably require broader support+ across different compiler backends.+ .+ The C code dynamically links to @libgcc_s@, which can cause problems in GHCi.+ GHCi does not currently support sonames and tries to open @libgcc_s.so@ while+ ignoring e.g. @libgcc_s.so.1@. A possible workaround for GHCi on a linux+ system: @ln -s \/lib\/libgcc_s.so.1 \/lib\/libgcc_s.so@. Let me know about+ any other solutions to this issue for GHCi. Regular GHC compilation uses the+ system linker with soname support and does not run into this issue.+ .+ Relevant Hackage tickets:+ .+ * <http://hackage.haskell.org/trac/ghc/ticket/3563>+ .+ * <http://hackage.haskell.org/trac/ghc/ticket/4102>+Category: Data, Concurrency, Foreign Stability: experimental Build-Type: Simple Cabal-Version: >= 1.6@@ -42,7 +46,9 @@ --CC-Options: -O3 -fomit-frame-pointer -march=native -Wall -- Try link-time optimization (inlining) with gcc 4.5: -- CC-Options: -fomit-frame-pointer -march=native -Wall -flto- CC-Options: -fomit-frame-pointer -march=native -Wall+ CC-Options: -Wall+ if os (linux)+ CC-Options: -fomit-frame-pointer -march=native Extra-Libraries: gcc_s Include-Dirs: cbits Install-Includes: bitops-gcc.h atomic-bitops-gcc.h