diff options
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/midi_driver.cpp | 1 | ||||
-rw-r--r-- | core/os/os.cpp | 10 | ||||
-rw-r--r-- | core/os/os.h | 4 | ||||
-rw-r--r-- | core/os/spin_lock.h | 2 | ||||
-rw-r--r-- | core/os/threaded_array_processor.h | 1 |
5 files changed, 12 insertions, 6 deletions
diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp index 8431ceacf9..410b62068a 100644 --- a/core/os/midi_driver.cpp +++ b/core/os/midi_driver.cpp @@ -31,7 +31,6 @@ #include "midi_driver.h" #include "core/input/input.h" -#include "core/os/os.h" uint8_t MIDIDriver::last_received_message = 0x00; MIDIDriver *MIDIDriver::singleton = nullptr; diff --git a/core/os/os.cpp b/core/os/os.cpp index 0032e8e4bc..9837b6e0aa 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -358,6 +358,10 @@ int OS::get_processor_count() const { return 1; } +String OS::get_processor_name() const { + return ""; +} + bool OS::can_use_threads() const { #ifdef NO_THREADS return false; @@ -387,16 +391,18 @@ bool OS::has_feature(const String &p_feature) { return true; } #else - if (p_feature == "release") + if (p_feature == "release") { return true; + } #endif #ifdef TOOLS_ENABLED if (p_feature == "editor") { return true; } #else - if (p_feature == "standalone") + if (p_feature == "standalone") { return true; + } #endif if (sizeof(void *) == 8 && p_feature == "64") { diff --git a/core/os/os.h b/core/os/os.h index 36d85da70b..808d704b3d 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -34,7 +34,6 @@ #include "core/config/engine.h" #include "core/io/image.h" #include "core/io/logger.h" -#include "core/os/main_loop.h" #include "core/string/ustring.h" #include "core/templates/list.h" #include "core/templates/vector.h" @@ -133,6 +132,8 @@ public: virtual String get_stdin_string(bool p_block = true) = 0; + virtual Error get_entropy(uint8_t *r_buffer, int p_bytes) = 0; // Should return cryptographically-safe random bytes. + virtual PackedStringArray get_connected_midi_inputs(); virtual void open_midi_inputs(); virtual void close_midi_inputs(); @@ -301,6 +302,7 @@ public: virtual void set_exit_code(int p_code); virtual int get_processor_count() const; + virtual String get_processor_name() const; virtual int get_default_thread_pool_size() const { return get_processor_count(); } virtual String get_unique_id() const; diff --git a/core/os/spin_lock.h b/core/os/spin_lock.h index 27d915e0ae..6e8d7f46d5 100644 --- a/core/os/spin_lock.h +++ b/core/os/spin_lock.h @@ -41,7 +41,7 @@ class SpinLock { public: _ALWAYS_INLINE_ void lock() { while (locked.test_and_set(std::memory_order_acquire)) { - ; + // Continue. } } _ALWAYS_INLINE_ void unlock() { diff --git a/core/os/threaded_array_processor.h b/core/os/threaded_array_processor.h index 48b86cc1a1..935fc7a360 100644 --- a/core/os/threaded_array_processor.h +++ b/core/os/threaded_array_processor.h @@ -31,7 +31,6 @@ #ifndef THREADED_ARRAY_PROCESSOR_H #define THREADED_ARRAY_PROCESSOR_H -#include "core/os/mutex.h" #include "core/os/os.h" #include "core/os/thread.h" #include "core/os/thread_safe.h" |