| Index: src/untrusted/irt/irt_dev_mprotect.c
|
| diff --git a/src/untrusted/irt/irt_dev_getpid.c b/src/untrusted/irt/irt_dev_mprotect.c
|
| similarity index 62%
|
| copy from src/untrusted/irt/irt_dev_getpid.c
|
| copy to src/untrusted/irt/irt_dev_mprotect.c
|
| index 8360fc8eecbf6015a38f4b39c545fa1028851e31..486667f86a35a2822685c43f202ae92fcb5d04bc 100644
|
| --- a/src/untrusted/irt/irt_dev_getpid.c
|
| +++ b/src/untrusted/irt/irt_dev_mprotect.c
|
| @@ -8,14 +8,10 @@
|
| #include "native_client/src/untrusted/irt/irt_interfaces.h"
|
| #include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
|
|
|
| -static int nacl_irt_dev_getpid_func(int *pid) {
|
| - int rv = NACL_SYSCALL(getpid)();
|
| - if (rv < 0)
|
| - return -rv;
|
| - *pid = rv;
|
| - return 0;
|
| +static int nacl_irt_mprotect(void *addr, size_t len, int prot) {
|
| + return -NACL_SYSCALL(mprotect)(addr, len, prot);
|
| }
|
|
|
| -const struct nacl_irt_dev_getpid nacl_irt_dev_getpid = {
|
| - nacl_irt_dev_getpid_func,
|
| +const struct nacl_irt_dev_mprotect nacl_irt_dev_mprotect = {
|
| + nacl_irt_mprotect,
|
| };
|
|
|