mirror of
https://github.com/libretro/libretro-common.git
synced 2024-05-12 01:25:31 -04:00
Make memsync() work on Apple arm64.
This commit is contained in:
parent
fce57fdfb7
commit
b0c348ea55
|
@ -131,14 +131,14 @@ int mprotect(void *addr, size_t len, int prot)
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(__MACH__) && defined(__arm__)
|
||||
#if defined(__MACH__) && (defined(__arm__) || defined(__arm64__))
|
||||
#include <libkern/OSCacheControl.h>
|
||||
#endif
|
||||
|
||||
int memsync(void *start, void *end)
|
||||
{
|
||||
size_t len = (char*)end - (char*)start;
|
||||
#if defined(__MACH__) && defined(__arm__)
|
||||
#if defined(__MACH__) && (defined(__arm__) || defined(__arm64__))
|
||||
sys_dcache_flush(start ,len);
|
||||
sys_icache_invalidate(start, len);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue