     value.store(2)
     print(value)
 
-    var p = UnsafeMutablePointer<Int>.alloc(1)
+    var p = AtomicMutablePointer(UnsafeMutablePointer<Int>.alloc(1))
 
     print(p)
 
-    var q = p.atomicRead()
-    let r = q.atomicSwap(UnsafeMutablePointer<Int>.alloc(1))
-    p.atomicStore(q)
+    var q = AtomicMutablePointer(p.load())
+    let r = q.swap(UnsafeMutablePointer<Int>.alloc(1))
+    p.store(q.pointer)
 
     print(q)
     print(r)
     print(p)
     print("")
 
-    var pp = UnsafePointer<Int>(UnsafeMutablePointer<Int>.alloc(1))
+    var pp = AtomicPointer<Int>(UnsafeMutablePointer<Int>.alloc(1))
 
     print(pp)
 
-    var qq = pp.atomicRead()
-    let rr = qq.atomicSwap(UnsafePointer(UnsafeMutablePointer<Int>.alloc(1)))
-    pp.atomicStore(qq)
+    var qq = AtomicPointer(pp.load())
+    let rr = qq.swap(UnsafePointer(UnsafeMutablePointer<Int>.alloc(1)))
+    pp.store(qq.pointer)
 
     print(qq)
     print(rr)
     print(pp)
     print("")
 
-    var i = Int32(nzRandom())
+    var i = AtomicInt32(Int32(nzRandom()))
 
     print(i)
 
-    var j = i.atomicRead()
-    let k = j.atomicSwap(Int32(nzRandom()))
-    i.atomicStore(j)
+    var j = AtomicInt32(i.load())
+    let k = j.swap(Int32(nzRandom()))
+    i.store(j.value)
 
     print(j)
     print(k)
     print(i)
     print("")
 
-    var ii = Int64(nzRandom())
+    var ii = AtomicInt64(Int64(nzRandom()))
 
     print(ii)
 
-    var jj = ii.atomicRead()
-    let kk = jj.atomicSwap(numericCast(nzRandom()))
-    ii.atomicStore(jj)
+    var jj = AtomicInt64(ii.load())
+    let kk = jj.swap(numericCast(nzRandom()))
+    ii.store(jj.value)
 
     print(jj)
     print(kk)

    XCTAssert(randUInt.CAS(current: randUInt.value, future: storUInt))
    XCTAssert(randUInt.value == storUInt)

    var randInt32 = Int32(nzRandom())
    let storInt32 = Int32(nzRandom())
    XCTAssertFalse(randInt32.CAS(current: 0, future: randInt32))
    XCTAssert(randInt32.CAS(current: randInt32, future: storInt32))
    XCTAssert(randInt32 == storInt32)

    var randUInt32 = UInt32(nzRandom())
    let storUInt32 = UInt32(nzRandom())
    XCTAssertFalse(randUInt32.CAS(current: 0, future: randUInt32))
    XCTAssert(randUInt32.CAS(current: randUInt32, future: storUInt32))
    XCTAssert(randUInt32 == storUInt32)

    var randInt64 = Int64(nzRandom())
    let storInt64 = Int64(nzRandom())
    XCTAssertFalse(randInt64.CAS(current: 0, future: randInt64))
    XCTAssert(randInt64.CAS(current: randInt64, future: storInt64))
    XCTAssert(randInt64 == storInt64)

    var randUInt64 = UInt64(nzRandom())
    let storUInt64 = UInt64(nzRandom())
    XCTAssertFalse(randUInt64.CAS(current: 0, future: randUInt64))
    XCTAssert(randUInt64.CAS(current: randUInt64, future: storUInt64))
    XCTAssert(randUInt64 == storUInt64)

    var randPtr = UnsafePointer<CGPoint>(bitPattern: nzRandom())
    let storPtr = UnsafePointer<CGPoint>(bitPattern: nzRandom())
    XCTAssertFalse(randPtr.CAS(current: nil, future: randPtr))
    XCTAssert(randPtr.CAS(current: randPtr, future: storPtr))
    XCTAssert(randPtr == storPtr)

    var randMutPtr = UnsafeMutablePointer<CGPoint>(bitPattern: nzRandom())
    let storMutPtr = UnsafeMutablePointer<CGPoint>(bitPattern: nzRandom())
    XCTAssertFalse(randMutPtr.CAS(current: nil, future: randMutPtr))
    XCTAssert(randMutPtr.CAS(current: randMutPtr, future: storMutPtr))
    XCTAssert(randMutPtr == storMutPtr)

    var randOPtr = COpaquePointer(bitPattern: nzRandom())
    let storOPtr = COpaquePointer(bitPattern: nzRandom())
    XCTAssertFalse(randOPtr.CAS(current: nil, future: randOPtr))
    XCTAssert(randOPtr.CAS(current: randOPtr, future: storOPtr))
    XCTAssert(randOPtr == storOPtr)
  }

  func testPerformanceStore()

    XCTAssert(randUInt == storUInt.value)

    let randInt32 = Int32(nzRandom())
    var storInt32 = AtomicInt32(Int32(nzRandom()))
    storInt32.store(randInt32)
    XCTAssert(randInt32 == storInt32.value)

    let randUInt32 = UInt32(nzRandom())
    var storUInt32 = AtomicUInt32(UInt32(nzRandom()))
    storUInt32.store(randUInt32)
    XCTAssert(randUInt32 == storUInt32.value)

    let randInt64 = Int64(nzRandom())
    var storInt64 = AtomicInt64(Int64(nzRandom()))
    storInt64.store(randInt64)
    XCTAssert(randInt64 == storInt64.value)

    let randUInt64 = UInt64(nzRandom())
    var storUInt64 = AtomicUInt64(UInt64(nzRandom()))
    storUInt64.store(randUInt64)
    XCTAssert(randUInt64 == storUInt64.value)

    let randPtr = UnsafePointer<CGPoint>(bitPattern: nzRandom())
    var storPtr = AtomicPointer(UnsafePointer<CGPoint>(bitPattern: nzRandom()))
    storPtr.store(randPtr)
    XCTAssert(randPtr == storPtr.pointer)

    let randMutPtr = UnsafeMutablePointer<CGPoint>(bitPattern: nzRandom())
    var storMutPtr = AtomicMutablePointer(UnsafeMutablePointer<CGPoint>(bitPattern: nzRandom()))
    storMutPtr.store(randMutPtr)
    XCTAssert(randMutPtr == storMutPtr.pointer)

    let randOPtr = COpaquePointer(bitPattern: nzRandom())
    var storOPtr = AtomicOpaquePointer(COpaquePointer(bitPattern: nzRandom()))
    storOPtr.store(randOPtr)
    XCTAssert(randOPtr == storOPtr.pointer)
  }
  
  
