[commit: testsuite] master: Rename atomicReadMVar and friends to readMVar. (27d4d6e)

Edward Z. Yang ezyang at ghc.haskell.org
Tue Jul 16 04:15:50 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/27d4d6e8924d3dabf66308378536c89cb8a9a4f8

>---------------------------------------------------------------

commit 27d4d6e8924d3dabf66308378536c89cb8a9a4f8
Author: Edward Z. Yang <ezyang at mit.edu>
Date:   Fri Jul 12 18:12:29 2013 -0700

    Rename atomicReadMVar and friends to readMVar.
    
    Signed-off-by: Edward Z. Yang <ezyang at mit.edu>

>---------------------------------------------------------------

 tests/concurrent/should_run/all.T                              |    8 ++++----
 .../concurrent/should_run/{atomicReadMVar1.hs => readMVar1.hs} |    3 +--
 .../concurrent/should_run/{atomicReadMVar2.hs => readMVar2.hs} |    5 ++---
 .../concurrent/should_run/{atomicReadMVar3.hs => readMVar3.hs} |    3 +--
 .../should_run/{tryAtomicReadMVar1.hs => tryReadMVar1.hs}      |    5 ++---
 5 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/tests/concurrent/should_run/all.T b/tests/concurrent/should_run/all.T
index 1b729fa..454969e 100644
--- a/tests/concurrent/should_run/all.T
+++ b/tests/concurrent/should_run/all.T
@@ -74,10 +74,10 @@ test('T5611', normal, compile_and_run, [''])
 test('T5238', normal, compile_and_run, [''])
 test('T5866', exit_code(1), compile_and_run, [''])
 
-test('atomicReadMVar1', normal, compile_and_run, [''])
-test('atomicReadMVar2', normal, compile_and_run, [''])
-test('atomicReadMVar3', normal, compile_and_run, [''])
-test('tryAtomicReadMVar1', normal, compile_and_run, [''])
+test('readMVar1', normal, compile_and_run, [''])
+test('readMVar2', normal, compile_and_run, [''])
+test('readMVar3', normal, compile_and_run, [''])
+test('tryReadMVar1', normal, compile_and_run, [''])
 
 # -----------------------------------------------------------------------------
 # These tests we only do for a full run
diff --git a/tests/concurrent/should_run/atomicReadMVar1.hs b/tests/concurrent/should_run/readMVar1.hs
similarity index 88%
rename from tests/concurrent/should_run/atomicReadMVar1.hs
rename to tests/concurrent/should_run/readMVar1.hs
index ffbcd57..7038cad 100644
--- a/tests/concurrent/should_run/atomicReadMVar1.hs
+++ b/tests/concurrent/should_run/readMVar1.hs
@@ -1,6 +1,5 @@
 module Main where
 
-import GHC.MVar
 import Control.Concurrent
 
 main = do
@@ -8,7 +7,7 @@ main = do
     m <- newMVar (0 :: Int)
     let readloop 0 = return ()
         readloop i = do
-            atomicReadMVar m
+            readMVar m
             readloop (i-1)
         writeloop 0 = return ()
         writeloop i = do
diff --git a/tests/concurrent/should_run/atomicReadMVar2.hs b/tests/concurrent/should_run/readMVar2.hs
similarity index 76%
rename from tests/concurrent/should_run/atomicReadMVar2.hs
rename to tests/concurrent/should_run/readMVar2.hs
index 1604119..7d6eb5c 100644
--- a/tests/concurrent/should_run/atomicReadMVar2.hs
+++ b/tests/concurrent/should_run/readMVar2.hs
@@ -1,14 +1,13 @@
 module Main where
 
-import GHC.MVar
 import Control.Concurrent
 
 main = do
     m <- newEmptyMVar
     sync <- newEmptyMVar
-    let f = atomicReadMVar m
+    let f = readMVar m
     t1 <- forkIO (f >> error "FAILURE")
     t2 <- forkIO (f >> putMVar sync ())
     killThread t1
     putMVar m (0 :: Int)
-    atomicReadMVar sync
+    readMVar sync
diff --git a/tests/concurrent/should_run/atomicReadMVar3.hs b/tests/concurrent/should_run/readMVar3.hs
similarity index 86%
rename from tests/concurrent/should_run/atomicReadMVar3.hs
rename to tests/concurrent/should_run/readMVar3.hs
index bf73914..98f1a7b 100644
--- a/tests/concurrent/should_run/atomicReadMVar3.hs
+++ b/tests/concurrent/should_run/readMVar3.hs
@@ -1,6 +1,5 @@
 module Main where
 
-import GHC.MVar
 import Control.Concurrent
 
 -- example from
@@ -10,7 +9,7 @@ main = do
     m <- newMVar (0 :: Int)
     forkIO $ putMVar m 1
     yield
-    r1 <- atomicReadMVar m
+    r1 <- readMVar m
     r2 <- takeMVar m
     r3 <- takeMVar m
     return ()
diff --git a/tests/concurrent/should_run/tryAtomicReadMVar1.hs b/tests/concurrent/should_run/tryReadMVar1.hs
similarity index 57%
rename from tests/concurrent/should_run/tryAtomicReadMVar1.hs
rename to tests/concurrent/should_run/tryReadMVar1.hs
index 387dde3..3c202a6 100644
--- a/tests/concurrent/should_run/tryAtomicReadMVar1.hs
+++ b/tests/concurrent/should_run/tryReadMVar1.hs
@@ -1,11 +1,10 @@
 module Main where
 
-import GHC.MVar
 import Control.Concurrent
 
 main = do
     m <- newMVar (0 :: Int)
-    Just 0 <- tryAtomicReadMVar m
+    Just 0 <- tryReadMVar m
     takeMVar m
-    Nothing <- tryAtomicReadMVar m
+    Nothing <- tryReadMVar m
     return ()






More information about the ghc-commits mailing list