mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-11 05:14:40 +00:00
Prefer sys_icache_invalidate on iOS
Also break compilation with error if clear cache is not available
This commit is contained in:
parent
5611249af7
commit
578bebb04d
1 changed files with 5 additions and 3 deletions
|
@ -109,10 +109,12 @@ void sys_icache_invalidate(void *start, size_t len);
|
|||
|
||||
static void clear_code_cache(char* p1, char* p2)
|
||||
{
|
||||
# if defined (HAVE_BUILTIN_CLEAR_CACHE) || defined (__GNUC__)
|
||||
__builtin___clear_cache(p1, p2);
|
||||
# elif defined(ios_HOST_OS) || defined (darwin_HOST_OS)
|
||||
# if defined(ios_HOST_OS) || defined (darwin_HOST_OS)
|
||||
sys_icache_invalidate(p1, static_cast<size_t>(p2 - p1));
|
||||
# elif defined (HAVE_BUILTIN_CLEAR_CACHE) || defined (__GNUC__)
|
||||
__builtin___clear_cache(p1, p2);
|
||||
# else
|
||||
# error "No clear code cache function found"
|
||||
# endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue