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.
This commit is contained in:
parent
c9768f15f7
commit
9a3a2b03b8
33 changed files with 79 additions and 803 deletions
|
|
@ -10,7 +10,6 @@ common_server = [\
|
|||
|
||||
if sys.platform == "darwin":
|
||||
common_server.append("#platform/osx/crash_handler_osx.mm")
|
||||
common_server.append("#platform/osx/semaphore_osx.cpp")
|
||||
else:
|
||||
common_server.append("#platform/x11/crash_handler_x11.cpp")
|
||||
|
||||
|
|
|
|||
|
|
@ -68,10 +68,6 @@ void OS_Server::initialize_core() {
|
|||
crash_handler.initialize();
|
||||
|
||||
OS_Unix::initialize_core();
|
||||
|
||||
#ifdef __APPLE__
|
||||
SemaphoreOSX::make_default();
|
||||
#endif
|
||||
}
|
||||
|
||||
Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue