Skip to content

Commit

Permalink
Allow for platform Thread implementation override
Browse files Browse the repository at this point in the history
  • Loading branch information
lucypero committed Sep 16, 2021
1 parent f701d9b commit e9723ef
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/object/script_language.h"
Expand Down Expand Up @@ -126,3 +130,4 @@ Thread::~Thread() {
}

#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 @@ -116,3 +121,4 @@ class Thread {
};

#endif // THREAD_H
#endif // PLATFORM_CUSTOM_THREAD_H

0 comments on commit e9723ef

Please sign in to comment.