summaryrefslogtreecommitdiff
path: root/core/os/os.h
diff options
context:
space:
mode:
authorThomas Herzog <thomas.herzog@mail.com>2017-07-26 15:30:04 +0200
committerGitHub <noreply@github.com>2017-07-26 15:30:04 +0200
commit9caf9fa76f93a689d63d89ef53d6dd5af42a8c0c (patch)
treeadc32ad20b02d26095372b40f76fae122ee5acc2 /core/os/os.h
parent668f4f437f2b720373be8944c573fd9a0e07825d (diff)
parent3b88476130aa2fe1af7d089cd18a9abc72e23678 (diff)
Merge pull request #9720 from endragor/stack-bottom
Add a way to retrieve stack bottom of the main thread
Diffstat (limited to 'core/os/os.h')
-rw-r--r--core/os/os.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/os/os.h b/core/os/os.h
index 362fec8a9e..957c1d0ba7 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -60,6 +60,8 @@ class OS {
char *last_error;
+ void *_stack_bottom;
+
public:
enum RenderThreadMode {
@@ -411,6 +413,13 @@ public:
bool check_feature_support(const String &p_feature);
+ /**
+ * Returns the stack bottom of the main thread of the application.
+ * This may be of use when integrating languages with garbage collectors that
+ * need to check whether a pointer is on the stack.
+ */
+ virtual void *get_stack_bottom() const;
+
bool is_hidpi_allowed() const { return _allow_hidpi; }
OS();
virtual ~OS();