about summary refs log tree commit diff
path: root/src/base/tl/threading.h
diff options
context:
space:
mode:
authorTeetime <TeetimeTW@yahoo.de>2013-03-24 04:19:57 +0100
committerTeetime <TeetimeTW@yahoo.de>2013-03-24 04:19:57 +0100
commit4affc155a906b6091aafc3f9635acc3b8b0aed8a (patch)
tree43e4dc20b9c36599571f3caf2e9108a4bb3f5401 /src/base/tl/threading.h
parent6e73cd75bf24eb98781c68ae47d6527cc03262c8 (diff)
parent0914490bd994185caef6bfc3038f5cec737e31f3 (diff)
downloadzcatch-4affc155a906b6091aafc3f9635acc3b8b0aed8a.tar.gz
zcatch-4affc155a906b6091aafc3f9635acc3b8b0aed8a.zip
Merge branch 'master0.6' into zCatch
Conflicts:
	data/languages/index.txt
	src/game/server/entities/character.cpp
Diffstat (limited to 'src/base/tl/threading.h')
-rw-r--r--src/base/tl/threading.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/base/tl/threading.h b/src/base/tl/threading.h
index dbf788cd..5caf8588 100644
--- a/src/base/tl/threading.h
+++ b/src/base/tl/threading.h
@@ -58,15 +58,21 @@
 	#error missing atomic implementation for this compiler
 #endif
 
-class semaphore
-{
-	SEMAPHORE sem;
-public:
-	semaphore() { semaphore_init(&sem); }
-	~semaphore() { semaphore_destroy(&sem); }
-	void wait() { semaphore_wait(&sem); }
-	void signal() { semaphore_signal(&sem); }
-};
+#if defined(CONF_PLATFORM_MACOSX)
+	/*
+		use semaphore provided by SDL on macosx
+	*/
+#else
+	class semaphore
+	{
+		SEMAPHORE sem;
+	public:
+		semaphore() { semaphore_init(&sem); }
+		~semaphore() { semaphore_destroy(&sem); }
+		void wait() { semaphore_wait(&sem); }
+		void signal() { semaphore_signal(&sem); }
+	};
+#endif
 
 class lock
 {