mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-07-17 22:52:15 +02:00
fix stack getting on linux, add test
This commit is contained in:
parent
097e04ab54
commit
d5b858f5ba
@ -36,7 +36,7 @@ namespace ams::os::impl {
|
|||||||
/* Get the thread satck. */
|
/* Get the thread satck. */
|
||||||
void *base = nullptr;
|
void *base = nullptr;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
const auto getstack_res = pthread_getattr_np(pthread_self(), std::addressof(attr));
|
const auto getstack_res = pthread_attr_getstack(std::addressof(attr), std::addressof(base), std::addressof(size));
|
||||||
AMS_ABORT_UNLESS(getstack_res == 0);
|
AMS_ABORT_UNLESS(getstack_res == 0);
|
||||||
|
|
||||||
*out_stack = reinterpret_cast<uintptr_t>(base);
|
*out_stack = reinterpret_cast<uintptr_t>(base);
|
||||||
|
Loading…
Reference in New Issue
Block a user