#include "util/u_memory.h"
#include "util/os_time.h"
+#include "os/os_mman.h"
#include "pan_screen.h"
#include "pan_resource.h"
assert(0);
}
- mem->cpu = mmap(NULL, mem->size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ mem->cpu = os_mmap(NULL, mem->size, PROT_READ | PROT_WRITE, MAP_SHARED,
drm->fd, mmap_bo.offset);
if (mem->cpu == MAP_FAILED) {
fprintf(stderr, "mmap failed: %p\n", mem->cpu);
};
int ret;
- if (munmap((void *) (uintptr_t) mem->cpu, mem->size)) {
+ if (os_munmap((void *) (uintptr_t) mem->cpu, mem->size)) {
perror("munmap");
abort();
}
bo->size = lseek(whandle->handle, 0, SEEK_END);
assert(bo->size > 0);
- bo->cpu = mmap(NULL, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ bo->cpu = os_mmap(NULL, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED,
drm->fd, mmap_bo.offset);
if (bo->cpu == MAP_FAILED) {
fprintf(stderr, "mmap failed: %p\n", bo->cpu);