fix stack base detection on hppa

Forwarded: not-yet
Last-Update: 2018-12-18

Gbp-Pq: Name hppa_stackbase.diff
This commit is contained in:
John David Anglin 2022-05-19 17:36:03 +08:00 committed by openKylinBot
parent 0fe0172499
commit 4482957dbe
1 changed files with 5 additions and 0 deletions

View File

@ -672,7 +672,12 @@ static inline void* currentThreadStackBase()
pthread_attr_destroy(&sattr); pthread_attr_destroy(&sattr);
stackThread = thread; stackThread = thread;
} }
#if defined(__hppa__)
// Stack grows up.
return static_cast<char*>(stackBase);
#else
return static_cast<char*>(stackBase) + stackSize; return static_cast<char*>(stackBase) + stackSize;
#endif
#else #else
#error Need a way to get the stack base on this platform #error Need a way to get the stack base on this platform
#endif #endif