Lines Matching refs:errcode
68 int errcode; in pt_iscache_init() local
70 errcode = mtx_init(&iscache->lock, mtx_plain); in pt_iscache_init()
71 if (errcode != thrd_success) in pt_iscache_init()
101 int errcode; in pt_iscache_lock() local
103 errcode = mtx_lock(&iscache->lock); in pt_iscache_lock()
104 if (errcode != thrd_success) in pt_iscache_lock()
119 int errcode; in pt_iscache_unlock() local
121 errcode = mtx_unlock(&iscache->lock); in pt_iscache_unlock()
122 if (errcode != thrd_success) in pt_iscache_unlock()
211 int errcode; in pt_iscache_lru_free() local
216 errcode = pt_section_unmap(trash->section); in pt_iscache_lru_free()
217 if (errcode < 0) in pt_iscache_lru_free()
218 return errcode; in pt_iscache_lru_free()
268 int errcode; in pt_isache_lru_new() local
273 errcode = pt_section_memsize(section, &memsize); in pt_isache_lru_new()
274 if (errcode < 0) in pt_isache_lru_new()
275 return errcode; in pt_isache_lru_new()
284 errcode = pt_section_map_share(section); in pt_isache_lru_new()
285 if (errcode < 0) in pt_isache_lru_new()
286 return errcode; in pt_isache_lru_new()
434 int errcode; in pt_iscache_lru_clear() local
436 errcode = pt_iscache_lock(iscache); in pt_iscache_lru_clear()
437 if (errcode < 0) in pt_iscache_lru_clear()
438 return errcode; in pt_iscache_lru_clear()
444 errcode = pt_iscache_unlock(iscache); in pt_iscache_lru_clear()
445 if (errcode < 0) in pt_iscache_lru_clear()
446 return errcode; in pt_iscache_lru_clear()
526 int errcode; in pt_iscache_add() local
564 errcode = pt_section_get(section); in pt_iscache_add()
565 if (errcode < 0) in pt_iscache_add()
566 return errcode; in pt_iscache_add()
568 errcode = pt_section_attach(section, iscache); in pt_iscache_add()
569 if (errcode < 0) in pt_iscache_add()
572 errcode = pt_iscache_lock(iscache); in pt_iscache_add()
573 if (errcode < 0) in pt_iscache_add()
600 errcode = match; in pt_iscache_add()
618 errcode = pt_iscache_unlock(iscache); in pt_iscache_add()
619 if (errcode < 0) in pt_iscache_add()
622 errcode = pt_section_detach(section, iscache); in pt_iscache_add()
623 if (errcode < 0) in pt_iscache_add()
626 errcode = pt_section_put(section); in pt_iscache_add()
627 if (errcode < 0) in pt_iscache_add()
628 return errcode; in pt_iscache_add()
643 errcode = pt_section_get(sec); in pt_iscache_add()
644 if (errcode < 0) in pt_iscache_add()
647 errcode = pt_iscache_unlock(iscache); in pt_iscache_add()
648 if (errcode < 0) { in pt_iscache_add()
653 errcode = pt_section_detach(section, iscache); in pt_iscache_add()
654 if (errcode < 0) { in pt_iscache_add()
659 errcode = pt_section_attach(sec, iscache); in pt_iscache_add()
660 if (errcode < 0) { in pt_iscache_add()
665 errcode = pt_iscache_lock(iscache); in pt_iscache_add()
666 if (errcode < 0) { in pt_iscache_add()
679 errcode = pt_iscache_lru_remove(iscache, section); in pt_iscache_add()
680 if (errcode < 0) { in pt_iscache_add()
688 errcode = pt_section_put(section); in pt_iscache_add()
689 if (errcode < 0) { in pt_iscache_add()
706 errcode = -pte_internal; in pt_iscache_add()
710 errcode = pt_iscache_expand(iscache); in pt_iscache_add()
711 if (errcode < 0) in pt_iscache_add()
716 errcode = -pte_internal; in pt_iscache_add()
731 errcode = pt_iscache_unlock(iscache); in pt_iscache_add()
732 if (errcode < 0) in pt_iscache_add()
733 return errcode; in pt_iscache_add()
749 return errcode; in pt_iscache_add()
756 int errcode, isid; in pt_iscache_find() local
758 errcode = pt_iscache_lock(iscache); in pt_iscache_find()
759 if (errcode < 0) in pt_iscache_find()
760 return errcode; in pt_iscache_find()
764 errcode = pt_iscache_unlock(iscache); in pt_iscache_find()
765 if (errcode < 0) in pt_iscache_find()
766 return errcode; in pt_iscache_find()
775 int errcode, status; in pt_iscache_lookup() local
789 errcode = pt_iscache_lock(iscache); in pt_iscache_lookup()
790 if (errcode < 0) in pt_iscache_lookup()
791 return errcode; in pt_iscache_lookup()
805 errcode = pt_iscache_unlock(iscache); in pt_iscache_lookup()
806 if (errcode < 0) in pt_iscache_lookup()
807 return errcode; in pt_iscache_lookup()
817 int errcode; in pt_iscache_clear() local
822 errcode = pt_iscache_lock(iscache); in pt_iscache_clear()
823 if (errcode < 0) in pt_iscache_clear()
824 return errcode; in pt_iscache_clear()
836 errcode = pt_iscache_unlock(iscache); in pt_iscache_clear()
837 if (errcode < 0) in pt_iscache_clear()
838 return errcode; in pt_iscache_clear()
840 errcode = pt_iscache_lru_free(lru); in pt_iscache_clear()
841 if (errcode < 0) in pt_iscache_clear()
842 return errcode; in pt_iscache_clear()
852 errcode = pt_section_detach(section, iscache); in pt_iscache_clear()
853 if (errcode < 0) in pt_iscache_clear()
854 return errcode; in pt_iscache_clear()
856 errcode = pt_section_put(section); in pt_iscache_clear()
857 if (errcode < 0) in pt_iscache_clear()
858 return errcode; in pt_iscache_clear()
888 int errcode, status; in pt_iscache_set_limit() local
896 errcode = pt_iscache_lock(iscache); in pt_iscache_set_limit()
897 if (errcode < 0) in pt_iscache_set_limit()
898 return errcode; in pt_iscache_set_limit()
904 errcode = pt_iscache_unlock(iscache); in pt_iscache_set_limit()
906 if (errcode < 0 || status < 0) in pt_iscache_set_limit()
907 return (status < 0) ? status : errcode; in pt_iscache_set_limit()
925 int errcode, match, isid; in pt_iscache_add_file() local
930 errcode = pt_iscache_lock(iscache); in pt_iscache_add_file()
931 if (errcode < 0) in pt_iscache_add_file()
932 return errcode; in pt_iscache_add_file()
953 errcode = pt_iscache_unlock(iscache); in pt_iscache_add_file()
954 if (errcode < 0) in pt_iscache_add_file()
955 return errcode; in pt_iscache_add_file()
962 errcode = pt_section_get(section); in pt_iscache_add_file()
963 if (errcode < 0) { in pt_iscache_add_file()
965 return errcode; in pt_iscache_add_file()
968 errcode = pt_iscache_unlock(iscache); in pt_iscache_add_file()
969 if (errcode < 0) { in pt_iscache_add_file()
971 return errcode; in pt_iscache_add_file()
974 errcode = pt_iscache_unlock(iscache); in pt_iscache_add_file()
975 if (errcode < 0) in pt_iscache_add_file()
976 return errcode; in pt_iscache_add_file()
989 errcode = pt_section_put(section); in pt_iscache_add_file()
990 if (errcode < 0) in pt_iscache_add_file()
991 return errcode; in pt_iscache_add_file()
1002 int errcode, status; in pt_iscache_read() local
1007 errcode = pt_iscache_lookup(iscache, §ion, &laddr, isid); in pt_iscache_read()
1008 if (errcode < 0) in pt_iscache_read()
1009 return errcode; in pt_iscache_read()
1018 errcode = pt_section_map(section); in pt_iscache_read()
1019 if (errcode < 0) { in pt_iscache_read()
1021 return errcode; in pt_iscache_read()
1032 errcode = pt_section_unmap(section); in pt_iscache_read()
1033 if (errcode < 0) { in pt_iscache_read()
1035 return errcode; in pt_iscache_read()
1038 errcode = pt_section_put(section); in pt_iscache_read()
1039 if (errcode < 0) in pt_iscache_read()
1040 return errcode; in pt_iscache_read()
1049 int errcode, status; in pt_iscache_notify_map() local
1053 errcode = pt_iscache_lock(iscache); in pt_iscache_notify_map()
1054 if (errcode < 0) in pt_iscache_notify_map()
1055 return errcode; in pt_iscache_notify_map()
1061 errcode = pt_iscache_unlock(iscache); in pt_iscache_notify_map()
1063 if (errcode < 0 || status < 0) in pt_iscache_notify_map()
1064 return (status < 0) ? status : errcode; in pt_iscache_notify_map()
1073 int errcode, status; in pt_iscache_notify_resize() local
1077 errcode = pt_iscache_lock(iscache); in pt_iscache_notify_resize()
1078 if (errcode < 0) in pt_iscache_notify_resize()
1079 return errcode; in pt_iscache_notify_resize()
1085 errcode = pt_iscache_unlock(iscache); in pt_iscache_notify_resize()
1087 if (errcode < 0 || status < 0) in pt_iscache_notify_resize()
1088 return (status < 0) ? status : errcode; in pt_iscache_notify_resize()