           buffer[i] = buffer.advancedBy(cursor).move()
           OSSpinLockUnlock(&lock)
           s.svalue = 0
+          s.iptr = nil
           s.currentState = ChannelSemaphoreState.Ready.rawValue
           return s
         }

//  Copyright (c) 2015 Guillaume Lessard. All rights reserved.
//

import Darwin.Mach
import Dispatch.time
import Foundation.NSThread



  deinit
  {
    if semp != 0
    {
      let kr = semaphore_destroy(mach_task_self_, semp)
      assert(kr == KERN_SUCCESS, __FUNCTION__)
    }
  }

  final private func initSemaphorePort()
