From 9a3a2b03b8b718409eb26252d742d48091756ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 3 Mar 2020 09:26:42 +0100 Subject: Drop old semaphore implementation - Removed platform-specific implementations. - Now all semaphores are in-object, unless they need to be conditionally created. - Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined. - Similarly to `Mutex`, methods are made `const` for easy use in such contexts. - Language bindings updated: `wait()` and `post()` are now `void`. - Language bindings updated: `try_wait()` added. Bonus: - Rewritten the `#ifdef` in `mutex.h` to meet the code style. --- drivers/unix/os_unix.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/unix/os_unix.cpp') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 1d94b9618d..f7da18a7f9 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -38,7 +38,6 @@ #include "drivers/unix/file_access_unix.h" #include "drivers/unix/net_socket_posix.h" #include "drivers/unix/rw_lock_posix.h" -#include "drivers/unix/semaphore_posix.h" #include "drivers/unix/thread_posix.h" #include "servers/visual_server.h" @@ -121,13 +120,9 @@ void OS_Unix::initialize_core() { #ifdef NO_THREADS ThreadDummy::make_default(); - SemaphoreDummy::make_default(); RWLockDummy::make_default(); #else ThreadPosix::make_default(); -#if !defined(OSX_ENABLED) && !defined(IPHONE_ENABLED) - SemaphorePosix::make_default(); -#endif RWLockPosix::make_default(); #endif FileAccess::make_default(FileAccess::ACCESS_RESOURCES); -- cgit v1.2.3