diff options
Diffstat (limited to 'ashmemtest-basic/ashmemtest.c')
-rw-r--r-- | ashmemtest-basic/ashmemtest.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ashmemtest-basic/ashmemtest.c b/ashmemtest-basic/ashmemtest.c index 0b20952..8d1be39 100644 --- a/ashmemtest-basic/ashmemtest.c +++ b/ashmemtest-basic/ashmemtest.c @@ -16,8 +16,8 @@ #include <stdarg.h> #ifdef ANDROID -/* In-tree compilation, use frameworks/native/include/utils/ashmem.h */ -#include <utils/ashmem.h> +/* In-tree compilation */ +#include <linux/ashmem.h> #else /* Freestanding compilation, use local copy */ #include "ashmem.h" @@ -275,26 +275,26 @@ void ashmem_pin_status (void) /* make sure we can examine zero-sized region (means everything onward) */ pin.offset = 0, pin.len = 0; - ret = ioctl (fd, ASHMEM_ISPINNED, &pin); + ret = ioctl (fd, ASHMEM_GET_PIN_STATUS, &pin); if (ret < 0) fatal (errno, "should be able to ask status of zero-sized region"); /* make sure we can't examine across page boundaries */ pin.offset = pagesize + 11, pin.len = pagesize + 17; - ret = ioctl (fd, ASHMEM_ISPINNED, &pin); + ret = ioctl (fd, ASHMEM_GET_PIN_STATUS, &pin); if (ret >= 0) fatal (errno, "should not be able to ask across page boundaries"); /* make sure we can't examine beyond the region */ pin.offset = size * 2, pin.len = pagesize; - ret = ioctl (fd, ASHMEM_ISPINNED, &pin); + ret = ioctl (fd, ASHMEM_GET_PIN_STATUS, &pin); if (ret >= 0) fatal (errno, "should not be able to ask beyond the region"); /* make sure it's initially pinned */ pin.offset = 0, pin.len = size; - ret = ioctl (fd, ASHMEM_ISPINNED, &pin); - if (ret != ASHMEM_NOW_PINNED) + ret = ioctl (fd, ASHMEM_GET_PIN_STATUS, &pin); + if (ret != ASHMEM_IS_PINNED) fatal (0, "expect initially pinned region"); /* unpin it */ @@ -305,8 +305,8 @@ void ashmem_pin_status (void) /* make sure it's not pinned now */ pin.offset = 0, pin.len = size; - ret = ioctl (fd, ASHMEM_ISPINNED, &pin); - if (ret != ASHMEM_NOW_UNPINNED) + ret = ioctl (fd, ASHMEM_GET_PIN_STATUS, &pin); + if (ret != ASHMEM_IS_UNPINNED) fatal (0, "expect unpinned region"); if (munmap (mem, size)) |