     @_transparent
     mutating func atomicAdd(amount: UInt64) -> UInt64 {
         @inline(__always)
-        func add(amount: UInt64, _ theVal: UnsafeMutablePointer<UInt64>) -> UInt64 {
+        func add(theVal: UnsafeMutablePointer<UInt64>) -> UInt64 {
             return UInt64(bitPattern: OSAtomicAdd64Barrier(Int64(bitPattern: amount), UnsafeMutablePointer(theVal)) - Int64(bitPattern: amount))
         }
-        return add(amount, &self)
+        return add(&self)
     }
     
     @_transparent

    @_transparent
    mutating func atomicAdd(amount: UInt32) -> UInt32 {
        @inline(__always)
        func add(amount: UInt32, _ theVal: UnsafeMutablePointer<UInt32>) -> UInt32 {
            return UInt32(bitPattern: OSAtomicAdd32Barrier(Int32(bitPattern: amount), UnsafeMutablePointer(theVal)) - Int32(bitPattern: amount))
        }
        return add(amount, &self)
    }
    
    @_transparent

    @_transparent
    public mutating func compareSet(oldVal: UInt64, _ newVal: UInt64) -> Bool {
        @inline(__always)
        func cas(theVal: UnsafeMutablePointer<UInt64>) -> Bool {
            return OSAtomicCompareAndSwap64Barrier(Int64(bitPattern: oldVal), Int64(bitPattern: newVal), UnsafeMutablePointer(theVal))
        }
        return cas(&self)
    }
}

