 		}
 	}
 	
-	typealias ThreadClosure = () -> ()
-	typealias ThreadQueue = Int // bogus
-	typealias ThreadOnce = pthread_once_t
-	typealias ThreadFunction = @convention(c) (UnsafeMutablePointer<Void>) -> UnsafeMutablePointer<Void>
+	public typealias ThreadClosure = () -> ()
+	public typealias ThreadQueue = Int // bogus
+	public typealias ThreadOnce = pthread_once_t
+	public typealias ThreadFunction = @convention(c) (UnsafeMutablePointer<Void>) -> UnsafeMutablePointer<Void>
 	
 	class IsThisRequired {
 		let closure: ThreadClosure

#endif
	}
	
	static func waitSemaphore(semaphore: ThreadSemaphore, waitMillis: Int) {
		if waitMillis == -1 {
#if USE_LIBDISPATCH
			dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER)

#endif
#endif

public class Threading {
	
	public typealias ThreadOnceFunction = @convention(c) () -> ()
	
#if USE_LIBDISPATCH
	public typealias ThreadClosure = () -> ()
	public typealias ThreadQueue = dispatch_queue_t
	public typealias ThreadSemaphore = dispatch_semaphore_t
	public typealias ThreadOnce = dispatch_once_t
#else
	
	public class ThreadSemaphore {
		
		var mutex = pthread_mutex_t()
		var cond = pthread_cond_t()
