• Home
  • Raw
  • Download

Lines Matching refs:map

223 static int lock_check(char *map)  in lock_check()  argument
228 page1_flags = get_pageflags((unsigned long)map); in lock_check()
229 page2_flags = get_pageflags((unsigned long)map + page_size); in lock_check()
248 if (!is_vmflag_set((unsigned long)map, LOCKED)) { in lock_check()
253 if (!is_vmflag_set((unsigned long)map + page_size, LOCKED)) { in lock_check()
261 static int unlock_lock_check(char *map) in unlock_lock_check() argument
266 page1_flags = get_pageflags((unsigned long)map); in unlock_lock_check()
267 page2_flags = get_pageflags((unsigned long)map + page_size); in unlock_lock_check()
276 if (is_vmflag_set((unsigned long)map, LOCKED)) { in unlock_lock_check()
281 if (is_vmflag_set((unsigned long)map + page_size, LOCKED)) { in unlock_lock_check()
291 char *map; in test_mlock_lock() local
295 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_mlock_lock()
297 if (map == MAP_FAILED) { in test_mlock_lock()
302 if (mlock2_(map, 2 * page_size, 0)) { in test_mlock_lock()
311 if (lock_check(map)) in test_mlock_lock()
315 if (munlock(map, 2 * page_size)) { in test_mlock_lock()
320 ret = unlock_lock_check(map); in test_mlock_lock()
323 munmap(map, 2 * page_size); in test_mlock_lock()
328 static int onfault_check(char *map) in onfault_check() argument
333 page1_flags = get_pageflags((unsigned long)map); in onfault_check()
334 page2_flags = get_pageflags((unsigned long)map + page_size); in onfault_check()
342 *map = 'a'; in onfault_check()
343 page1_flags = get_pageflags((unsigned long)map); in onfault_check()
344 page2_flags = get_pageflags((unsigned long)map + page_size); in onfault_check()
363 if (!is_vma_lock_on_fault((unsigned long)map)) { in onfault_check()
368 if (!is_vma_lock_on_fault((unsigned long)map + page_size)) { in onfault_check()
376 static int unlock_onfault_check(char *map) in unlock_onfault_check() argument
381 page1_flags = get_pageflags((unsigned long)map); in unlock_onfault_check()
389 if (is_vma_lock_on_fault((unsigned long)map) || in unlock_onfault_check()
390 is_vma_lock_on_fault((unsigned long)map + page_size)) { in unlock_onfault_check()
400 char *map; in test_mlock_onfault() local
404 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_mlock_onfault()
406 if (map == MAP_FAILED) { in test_mlock_onfault()
411 if (mlock2_(map, 2 * page_size, MLOCK_ONFAULT)) { in test_mlock_onfault()
420 if (onfault_check(map)) in test_mlock_onfault()
424 if (munlock(map, 2 * page_size)) { in test_mlock_onfault()
433 ret = unlock_onfault_check(map); in test_mlock_onfault()
435 munmap(map, 2 * page_size); in test_mlock_onfault()
442 char *map; in test_lock_onfault_of_present() local
447 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_lock_onfault_of_present()
449 if (map == MAP_FAILED) { in test_lock_onfault_of_present()
454 *map = 'a'; in test_lock_onfault_of_present()
456 if (mlock2_(map, 2 * page_size, MLOCK_ONFAULT)) { in test_lock_onfault_of_present()
465 page1_flags = get_pageflags((unsigned long)map); in test_lock_onfault_of_present()
466 page2_flags = get_pageflags((unsigned long)map + page_size); in test_lock_onfault_of_present()
476 if (!is_vma_lock_on_fault((unsigned long)map) || in test_lock_onfault_of_present()
477 !is_vma_lock_on_fault((unsigned long)map + page_size)) { in test_lock_onfault_of_present()
483 munmap(map, 2 * page_size); in test_lock_onfault_of_present()
490 char *map; in test_munlockall() local
494 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_munlockall()
497 if (map == MAP_FAILED) { in test_munlockall()
507 if (lock_check(map)) in test_munlockall()
515 if (unlock_lock_check(map)) in test_munlockall()
518 munmap(map, 2 * page_size); in test_munlockall()
520 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_munlockall()
523 if (map == MAP_FAILED) { in test_munlockall()
533 if (onfault_check(map)) in test_munlockall()
541 if (unlock_onfault_check(map)) in test_munlockall()
549 if (lock_check(map)) in test_munlockall()
557 ret = unlock_lock_check(map); in test_munlockall()
560 munmap(map, 2 * page_size); in test_munlockall()
569 void *map; in test_vma_management() local
575 map = mmap(NULL, 3 * page_size, PROT_READ | PROT_WRITE, in test_vma_management()
577 if (map == MAP_FAILED) { in test_vma_management()
582 if (call_mlock && mlock2_(map, 3 * page_size, MLOCK_ONFAULT)) { in test_vma_management()
591 if (get_vm_area((unsigned long)map, &page1) || in test_vma_management()
592 get_vm_area((unsigned long)map + page_size, &page2) || in test_vma_management()
593 get_vm_area((unsigned long)map + page_size * 2, &page3)) { in test_vma_management()
609 if (munlock(map + page_size, page_size)) { in test_vma_management()
614 if (get_vm_area((unsigned long)map, &page1) || in test_vma_management()
615 get_vm_area((unsigned long)map + page_size, &page2) || in test_vma_management()
616 get_vm_area((unsigned long)map + page_size * 2, &page3)) { in test_vma_management()
628 if (munlock(map, page_size * 3)) { in test_vma_management()
633 if (get_vm_area((unsigned long)map, &page1) || in test_vma_management()
634 get_vm_area((unsigned long)map + page_size, &page2) || in test_vma_management()
635 get_vm_area((unsigned long)map + page_size * 2, &page3)) { in test_vma_management()
648 munmap(map, 3 * page_size); in test_vma_management()