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
|
|
@ -40,14 +40,6 @@ void ThreadDummy::make_default() {
|
|||
Thread::create_func = &ThreadDummy::create;
|
||||
};
|
||||
|
||||
SemaphoreOld *SemaphoreDummy::create() {
|
||||
return memnew(SemaphoreDummy);
|
||||
};
|
||||
|
||||
void SemaphoreDummy::make_default() {
|
||||
SemaphoreOld::create_func = &SemaphoreDummy::create;
|
||||
};
|
||||
|
||||
RWLock *RWLockDummy::create() {
|
||||
return memnew(RWLockDummy);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue