diff --git a/src/coreclr/pal/src/CMakeLists.txt b/src/coreclr/pal/src/CMakeLists.txt index 68a688be19c2ab..74fc5d3bc5cd52 100644 --- a/src/coreclr/pal/src/CMakeLists.txt +++ b/src/coreclr/pal/src/CMakeLists.txt @@ -1,5 +1,5 @@ if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD) - # On OSX platforms and *BSD, we use the libunwind that's part of the OS + # On OSX and *BSD, we use the libunwind that's part of the OS set(CLR_CMAKE_USE_SYSTEM_LIBUNWIND 1) endif(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD) diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 1ed51a42b252f7..114e88409c473d 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -14,7 +14,7 @@ elseif(CLR_CMAKE_TARGET_SUNOS) set(CMAKE_REQUIRED_INCLUDES /opt/local/include) endif() -if(CLR_CMAKE_TARGET_APPLE) +if(CLR_CMAKE_TARGET_OSX) set(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE) elseif(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD) set(CMAKE_REQUIRED_DEFINITIONS "-D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L") diff --git a/src/coreclr/pal/src/include/pal/context.h b/src/coreclr/pal/src/include/pal/context.h index 425aea17e32c87..c702ae272a76bd 100644 --- a/src/coreclr/pal/src/include/pal/context.h +++ b/src/coreclr/pal/src/include/pal/context.h @@ -573,7 +573,7 @@ const fpsimd_context* GetConstNativeSigSimdContext(const native_context_t *mc) return GetNativeSigSimdContext(const_cast(mc)); } -#else // !defined(TARGET_OSX) +#else // TARGET_OSX #define MCREG_X0(mc) ((mc)->__ss.__x[0]) #define MCREG_X1(mc) ((mc)->__ss.__x[1]) @@ -623,7 +623,7 @@ const _STRUCT_ARM_NEON_STATE64* GetConstNativeSigSimdContext(const native_contex return GetNativeSigSimdContext(const_cast(mc)); } -#endif // !defined(TARGET_OSX) +#endif // TARGET_OSX #elif defined(HOST_LOONGARCH64) @@ -663,7 +663,7 @@ const _STRUCT_ARM_NEON_STATE64* GetConstNativeSigSimdContext(const native_contex #else // HOST_ARM64 -#if defined(TARGET_OSX) +#ifdef TARGET_OSX #define MCREG_Rbp(mc) ((mc)->__ss.__rbp) #define MCREG_Rip(mc) ((mc)->__ss.__rip) @@ -711,7 +711,7 @@ inline void *FPREG_Xstate_Ymmh(const ucontext_t *uc) return reinterpret_cast(&((_STRUCT_X86_AVX_STATE64&)FPSTATE(uc)).__fpu_ymmh0); } -#else // defined(TARGET_OSX) +#else //TARGET_OSX // For FreeBSD, as found in x86/ucontext.h #define MCREG_Rbp(mc) ((mc).mc_rbp) @@ -748,7 +748,7 @@ inline void *FPREG_Xstate_Ymmh(const ucontext_t *uc) #define FPREG_Xmm(uc, index) *(M128A*) &(FPSTATE(uc)->sv_xmm[index]) #define FPREG_St(uc, index) *(M128A*) &(FPSTATE(uc)->sv_fp[index].fp_acc) -#endif // defined(TARGET_OSX) +#endif // TARGET_OSX #endif // HOST_ARM64 #else // HOST_64BIT diff --git a/src/coreclr/pal/src/thread/process.cpp b/src/coreclr/pal/src/thread/process.cpp index 5d2cafb0f3fdaf..3f4402214959f8 100644 --- a/src/coreclr/pal/src/thread/process.cpp +++ b/src/coreclr/pal/src/thread/process.cpp @@ -2473,7 +2473,7 @@ InitializeFlushProcessWriteBuffers() } } -#ifdef TARGET_APPLE +#ifdef TARGET_OSX return TRUE; #else s_helperPage = static_cast(mmap(0, GetVirtualPageSize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0)); @@ -2503,7 +2503,7 @@ InitializeFlushProcessWriteBuffers() } return status == 0; -#endif // TARGET_APPLE +#endif // TARGET_OSX } #define FATAL_ASSERT(e, msg) \ @@ -2570,7 +2570,6 @@ FlushProcessWriteBuffers() // Request the threads pointer values to force the thread to emit a memory barrier size_t registers = 128; machret = thread_get_register_pointer_values(pThreads[i], &sp, ®isters, registerValues); - if (machret == KERN_INSUFFICIENT_BUFFER_SIZE) { CHECK_MACH("thread_get_register_pointer_values()", machret);