Skip to contentSkip to conversation

syscall mincore

PATCH New Kirill A. Shutemov 1 participant 1 message Feb 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscall mincore

Patch from Debian patchset in the attachment.

syscall.c renamed from syscall.c.orig +3 -1
@@ -3856,7 +3863,9 @@ long do_syscall(void *cpu_env, int num, 
         goto unimplemented;
 #ifdef TARGET_NR_mincore
     case TARGET_NR_mincore:
-        goto unimplemented;
+        page_unprotect_range((void*)arg3, ((size_t)arg2 + TARGET_PAGE_SIZE - 1) / TARGET_PAGE_SIZE);
+        ret = get_errno(mincore((void*)arg1, (size_t)arg2, (unsigned char*)arg3));
+        break;
 #endif
 #ifdef TARGET_NR_madvise
     case TARGET_NR_madvise: