diff options
| author | Stefan Boberg <[email protected]> | 2021-09-28 21:01:03 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-28 21:27:00 +0200 |
| commit | 559147e7fe58fd5ddac3a9e0c042ee15074ca480 (patch) | |
| tree | 8bbd9061962f4bd83e66232bf0fb5bc223c89f0d /zencore/zencore.cpp | |
| parent | apply: Re-enabled environment variable setup for child processes (diff) | |
| download | zen-559147e7fe58fd5ddac3a9e0c042ee15074ca480.tar.xz zen-559147e7fe58fd5ddac3a9e0c042ee15074ca480.zip | |
Removing a bunch of no-longer-useful code from stream.h/cpp in preparation for a greater purge
Diffstat (limited to 'zencore/zencore.cpp')
| -rw-r--r-- | zencore/zencore.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/zencore/zencore.cpp b/zencore/zencore.cpp index 0b94f3bea..f6abc2ee7 100644 --- a/zencore/zencore.cpp +++ b/zencore/zencore.cpp @@ -34,27 +34,30 @@ namespace zen { ////////////////////////////////////////////////////////////////////////// +// NOTE: This should just be removed bool IsPointerToStack(const void* ptr) { #if ZEN_PLATFORM_WINDOWS - ULONG_PTR low, high; - GetCurrentThreadStackLimits(&low, &high); + ULONG_PTR StackLow, StackHigh; + GetCurrentThreadStackLimits(&StackLow, &StackHigh); const uintptr_t intPtr = reinterpret_cast<uintptr_t>(ptr); - return (intPtr - low) < (high - low); + 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* low; + void* StackLow; size_t size; - pthread_attr_getstack(&attr, &low, &size); + pthread_attr_getstack(&attr, &StackLow, &size); - return (uintptr_t(ptr) - uintptr_t(low)) < uintptr_t(size); + return (uintptr_t(ptr) - uintptr_t(StackLow)) < uintptr_t(size); #elif 0 #endif } @@ -71,7 +74,7 @@ IsDebuggerPresent() std::optional<bool> InteractiveSessionFlag; -void +void SetIsInteractiveSession(bool Value) { InteractiveSessionFlag = Value; |