Skip to content

Commit

Permalink
Merge pull request #6536 from knn-k/aarch64macos5
Browse files Browse the repository at this point in the history
AArch64 macOS: Include pthread.h explicitly
  • Loading branch information
0xdaryl committed Jun 6, 2022
2 parents 49eb92e + 4e14eae commit 439d066
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/aarch64/runtime/VirtualGuardRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include "env/jittypes.h"
#include <infra/Assert.hpp>

#if defined(OSX)
#include <pthread.h> // for pthread_jit_write_protect_np
#endif

extern void arm64CodeSync(unsigned char *codeStart, unsigned int codeSize);

extern "C" void _patchVirtualGuard(uint8_t *locationAddr, uint8_t *destinationAddr, int32_t smpFlag)
Expand Down
4 changes: 4 additions & 0 deletions compiler/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
#include "stdarg.h"
#include "OMR/Bytes.hpp"

#if defined(OSX) && defined(AARCH64)
#include <pthread.h> // for pthread_jit_write_protect_np
#endif

namespace TR { class Optimizer; }
namespace TR { class RegisterDependencyConditions; }

Expand Down
4 changes: 4 additions & 0 deletions compiler/runtime/OMRCodeCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
#include <unistd.h>
#endif

#if defined(OSX) && defined(AARCH64)
#include <pthread.h> // for pthread_jit_write_protect_np
#endif

namespace TR { class CodeGenerator; }

/*****************************************************************************
Expand Down
4 changes: 4 additions & 0 deletions compiler/runtime/OMRCodeCacheManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ TR::CodeCacheSymbolContainer * OMR::CodeCacheManager::_symbolContainer = NULL;

#endif //HOST_OS == OMR_LINUX

#if defined(OSX) && defined(AARCH64)
#include <pthread.h> // for pthread_jit_write_protect_np
#endif

OMR::CodeCacheManager::CodeCacheManager(TR::RawAllocator rawAllocator) :
_rawAllocator(rawAllocator),
_initialized(false),
Expand Down

0 comments on commit 439d066

Please sign in to comment.