Skip to content

Commit 53200fa

Browse files
committed
Resync
1 parent 8bd779f commit 53200fa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

memmap/memmap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ int mprotect(void *addr, size_t len, int prot)
135135

136136
int memsync(void *start, void *end)
137137
{
138-
size_t _len = (char*)end - (char*)start;
139138
#if defined(__MACH__) && defined(__arm__)
139+
size_t _len = (char*)end - (char*)start;
140140
sys_dcache_flush(start, _len);
141141
sys_icache_invalidate(start, _len);
142142
return 0;
143143
#elif defined(__arm__) && !defined(__QNX__)
144144
__clear_cache(start, end);
145145
return 0;
146146
#elif defined(HAVE_MMAN)
147+
size_t _len = (char*)end - (char*)start;
147148
return msync(start, _len, MS_SYNC | MS_INVALIDATE
148149
#ifdef __QNX__
149150
MS_CACHE_ONLY

0 commit comments

Comments
 (0)