Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Side by Side Diff: sysdeps/nacl/mprotect.c

Issue 12382030: Provide mprotect syscall (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Addressed CR comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sysdeps/nacl/irt_syscalls.c ('k') | sysdeps/nacl/nacl_syscalls.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 #include <errno.h> 2 #include <errno.h>
3 #include <sys/mman.h> 3 #include <sys/mman.h>
4 4
5 #include <irt_syscalls.h> 5 #include <irt_syscalls.h>
6 6
7 7
8 int __munmap (void *start, size_t length) 8 int __mprotect (void *addr, size_t len, int prot)
9 { 9 {
10 int result = __nacl_irt_munmap (start, length); 10 int result = __nacl_irt_mprotect (addr, len, prot);
11 if (result != 0) { 11 if (result != 0) {
12 errno = result; 12 errno = result;
13 return -1; 13 return -1;
14 } 14 }
15 return 0; 15 return 0;
16 } 16 }
17 weak_alias (__munmap, munmap) 17 weak_alias (__mprotect, mprotect)
OLDNEW
« no previous file with comments | « sysdeps/nacl/irt_syscalls.c ('k') | sysdeps/nacl/nacl_syscalls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698