     expectEqual("abc", sharedString)
 
     // Verify that only one thread took ownership of the buffer.
-    if tid == .Replica {
-      replicaString = privateString
+    if tid == .Secondary {
+      secondaryString = privateString
     }
     barrier()
     if tid == .Primary {
       expectTrue(
         (privateString.bufferID == sharedString.bufferID) !=
-          (replicaString.bufferID == sharedString.bufferID))
+          (secondaryString.bufferID == sharedString.bufferID))
     }
   }
 }

  let (createRet1, tid1) = _stdlib_pthread_create_block(
    nil, sliceConcurrentAppendThread, .Primary)
  let (createRet2, tid2) = _stdlib_pthread_create_block(
    nil, sliceConcurrentAppendThread, .Replica)

  expectEqual(0, createRet1)
  expectEqual(0, createRet2)


enum ThreadID {
  case Primary
  case Secondary
}

var barrierVar: UnsafeMutablePointer<_stdlib_pthread_barrier_t> = nil
var sharedString: String = ""
var secondaryString: String = ""

func barrier() {
  var ret = _stdlib_pthread_barrier_wait(barrierVar)
