Skip to content

Commit

Permalink
Allow for platform Thread implementation override
Browse files Browse the repository at this point in the history
(cherry picked from commit e9723ef)
  • Loading branch information
lucypero authored and lekoder committed Dec 18, 2021
1 parent 41c09fa commit 276db6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/os/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/

// Define PLATFORM_CUSTOM_THREAD_H in platform_config.h
// Overriding the platform implementation is required in some proprietary platforms
#ifndef PLATFORM_CUSTOM_THREAD_H

#include "thread.h"

#include "core/script_language.h"
Expand Down Expand Up @@ -134,3 +138,4 @@ Thread::ID Thread::get_caller_id() {
}
}
#endif
#endif // PLATFORM_CUSTOM_THREAD_H
6 changes: 6 additions & 0 deletions core/os/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/

// Define PLATFORM_CUSTOM_THREAD_H in platform_config.h
// Overriding the platform implementation is required in some proprietary platforms
#ifdef PLATFORM_CUSTOM_THREAD_H
#include PLATFORM_CUSTOM_THREAD_H
#else
#ifndef THREAD_H
#define THREAD_H

Expand Down Expand Up @@ -114,3 +119,4 @@ class Thread {
};

#endif // THREAD_H
#endif // PLATFORM_CUSTOM_THREAD_H

0 comments on commit 276db6e

Please sign in to comment.