Lines Matching refs:last

76 static void shm_region_add(abi_ptr start, abi_ptr last)  in shm_region_add()  argument
81 i->last = last; in shm_region_add()
92 return i->last; in shm_region_find()
98 static void shm_region_rm_complete(abi_ptr start, abi_ptr last) in shm_region_rm_complete() argument
102 for (i = interval_tree_iter_first(&shm_regions, start, last); i; i = n) { in shm_region_rm_complete()
103 n = interval_tree_iter_next(i, start, last); in shm_region_rm_complete()
104 if (i->start >= start && i->last <= last) { in shm_region_rm_complete()
171 abi_ulong host_start, host_last, last; in target_mprotect() local
191 last = start + len - 1; in target_mprotect()
193 host_last = HOST_PAGE_ALIGN(last) - 1; in target_mprotect()
204 for (abi_ulong a = last; a < host_last; a += TARGET_PAGE_SIZE) { in target_mprotect()
228 if (last < host_last) { in target_mprotect()
231 for (abi_ulong a = last; a < host_last; a += TARGET_PAGE_SIZE) { in target_mprotect()
261 page_set_flags(start, last, page_flags); in target_mprotect()
270 static bool mmap_frag(abi_ulong real_start, abi_ulong start, abi_ulong last, in mmap_frag() argument
297 for (abi_ulong a = real_last; a > last; a -= TARGET_PAGE_SIZE) { in mmap_frag()
332 memset(g2h_untagged(start), 0, last - start + 1); in mmap_frag()
334 if (pread(fd, g2h_untagged(start), last - start + 1, offset) == -1) { in mmap_frag()
495 abi_ulong ret, last, real_start, real_last, retaddr, host_len; in target_mmap() local
620 last = start + len - 1; in target_mmap()
622 passthrough_last = last; in target_mmap()
628 last = start + len - 1; in target_mmap()
629 real_last = HOST_PAGE_ALIGN(last) - 1; in target_mmap()
636 if (last < start || !guest_range_valid_untagged(start, len)) { in target_mmap()
643 if (!page_check_range_empty(start, last)) { in target_mmap()
699 if (!mmap_frag(real_start, start, last, in target_mmap()
713 if (last < real_last) { in target_mmap()
715 if (!mmap_frag(real_page, real_page, last, in target_mmap()
756 page_set_flags(start, last, page_flags); in target_mmap()
763 if (passthrough_last < last) { in target_mmap()
764 page_set_flags(passthrough_last + 1, last, page_flags); in target_mmap()
767 shm_region_rm_complete(start, last); in target_mmap()
790 abi_ulong last; in mmap_reserve_or_unmap() local
795 last = start + len - 1; in mmap_reserve_or_unmap()
797 real_last = HOST_PAGE_ALIGN(last) - 1; in mmap_reserve_or_unmap()
810 for (a = last; a < real_last; a += TARGET_PAGE_SIZE) { in mmap_reserve_or_unmap()
824 for (prot = 0, a = last; a < real_last; a += TARGET_PAGE_SIZE) { in mmap_reserve_or_unmap()
1091 abi_ulong last; in target_shmat() local
1113 last = raddr + shm_info.shm_segsz - 1; in target_shmat()
1115 page_set_flags(raddr, last, in target_shmat()
1119 shm_region_rm_complete(raddr, last); in target_shmat()
1120 shm_region_add(raddr, last); in target_shmat()
1144 abi_ulong last = shm_region_find(shmaddr); in target_shmdt() local
1145 if (last == 0) { in target_shmdt()
1151 abi_ulong size = last - shmaddr + 1; in target_shmdt()
1153 page_set_flags(shmaddr, last, 0); in target_shmdt()
1154 shm_region_rm_complete(shmaddr, last); in target_shmdt()