     }
   }
 
+  // MARK: State Handling
+
   var rawState: Int32 { return currentState }
   var state: ChannelSemaphoreState { return ChannelSemaphoreState(rawValue: currentState)! }
 

case Done
}

final class ChannelSemaphore
{
  private var svalue: Int32
  private var semp = semaphore_t()

  private var currentState = ChannelSemaphoreState.Ready.rawValue
  private var pointer: UnsafeMutablePointer<Void> = nil

  private init(value: Int32)
  {

    }
    return nil
  }

  // MARK: Semaphore functionality

  func signal() -> Bool
  {
