1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00

AK+LibCore: Standardize on AK_OS_MACOS instead of __APPLE__

We use our custom platform definitions in most places, remove
the few remaining places we weren't using `AK_OS_MACOS`.
This commit is contained in:
Brian Gianforcaro 2021-09-12 09:06:33 -07:00 committed by Andreas Kling
parent 51da5d03da
commit 871ef7a735
3 changed files with 6 additions and 5 deletions

View file

@ -5,13 +5,14 @@
*/
#include <AK/Assertions.h>
#include <AK/Platform.h>
#include <AK/StackInfo.h>
#include <stdio.h>
#include <string.h>
#ifdef __serenity__
# include <serenity.h>
#elif defined(__linux__) or defined(__APPLE__)
#elif defined(__linux__) or defined(AK_OS_MACOS)
# include <pthread.h>
#endif
@ -36,7 +37,7 @@ StackInfo::StackInfo()
VERIFY_NOT_REACHED();
}
pthread_attr_destroy(&attr);
#elif __APPLE__
#elif defined(AK_OS_MACOS)
// NOTE: !! On MacOS, pthread_get_stackaddr_np gives the TOP of the stack, not the bottom!
FlatPtr top_of_stack = (FlatPtr)pthread_get_stackaddr_np(pthread_self());
m_size = (size_t)pthread_get_stacksize_np(pthread_self());