diff options
| author | Stefan Boberg <[email protected]> | 2021-09-28 22:02:52 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-28 22:02:52 +0200 |
| commit | bfa8934826f2e25cb128ef38255c16186d87de14 (patch) | |
| tree | e9260966636f7ebaf2634380f36e407bb43a0054 /zencore/zencore.cpp | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-bfa8934826f2e25cb128ef38255c16186d87de14.tar.xz zen-bfa8934826f2e25cb128ef38255c16186d87de14.zip | |
Removed IsPointerToStack()
Diffstat (limited to 'zencore/zencore.cpp')
| -rw-r--r-- | zencore/zencore.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/zencore/zencore.cpp b/zencore/zencore.cpp index f6abc2ee7..19acdd1f5 100644 --- a/zencore/zencore.cpp +++ b/zencore/zencore.cpp @@ -34,34 +34,6 @@ namespace zen { ////////////////////////////////////////////////////////////////////////// -// NOTE: This should just be removed -bool -IsPointerToStack(const void* ptr) -{ -#if ZEN_PLATFORM_WINDOWS - ULONG_PTR StackLow, StackHigh; - GetCurrentThreadStackLimits(&StackLow, &StackHigh); - - const uintptr_t intPtr = reinterpret_cast<uintptr_t>(ptr); - - const bool IsOnStack = (intPtr - StackLow) < (StackHigh - StackLow); - //ZEN_ASSERT(!IsOnStack); - return IsOnStack; -#elif ZEN_PLATFORM_LINUX - pthread_t self = pthread_self(); - - pthread_attr_t attr; - pthread_getattr_np(self, &attr); - - void* StackLow; - size_t size; - pthread_attr_getstack(&attr, &StackLow, &size); - - return (uintptr_t(ptr) - uintptr_t(StackLow)) < uintptr_t(size); -#elif 0 -#endif -} - bool IsDebuggerPresent() { |