blob: 5bba42dce2db22ea02c419cfcd714f9531087384 [file] [log] [blame]
diff --git a/third_party/ashmem/ashmem-dev.c b/third_party/ashmem/ashmem-dev.c
index 2303369d8167..52b3f47eeae0 100644
--- a/third_party/ashmem/ashmem-dev.c
+++ b/third_party/ashmem/ashmem-dev.c
@@ -72,6 +72,11 @@ int ashmem_set_prot_region(int fd, int prot)
return ioctl(fd, ASHMEM_SET_PROT_MASK, prot);
}
+int ashmem_get_prot_region(int fd)
+{
+ return ioctl(fd, ASHMEM_GET_PROT_MASK);
+}
+
int ashmem_pin_region(int fd, size_t offset, size_t len)
{
struct ashmem_pin pin = { offset, len };
diff --git a/third_party/ashmem/ashmem.h b/third_party/ashmem/ashmem.h
index 7d411cc064ba..d8afccbd2a6e 100644
--- a/third_party/ashmem/ashmem.h
+++ b/third_party/ashmem/ashmem.h
@@ -18,6 +18,7 @@ extern "C" {
int ashmem_create_region(const char *name, size_t size);
int ashmem_set_prot_region(int fd, int prot);
+int ashmem_get_prot_region(int fd);
int ashmem_pin_region(int fd, size_t offset, size_t len);
int ashmem_unpin_region(int fd, size_t offset, size_t len);
int ashmem_get_size_region(int fd);