     {
       guard kr == KERN_ABORTED else { fatalError("Bad response (\(kr)) from semaphore_wait() in \(__FUNCTION__)") }
     }
-    return true
   }
 }

      OSMemoryBarrier()
    }

    return (semaphore_signal(semp) == KERN_SUCCESS)
  }

  func wait() -> Bool
  {
    if OSAtomicDecrement32Barrier(&svalue) >= 0
    {
      return true
    }

    if semp == 0

  private var svalue: Int32
  private var semp: semaphore_t

  func signal()
  {
    switch OSAtomicIncrement32Barrier(&svalue)
    {
    case let v where v > 0:
      return

    case Int32.min:
      fatalError("Semaphore signaled too many times")
