Lines Matching refs:errcode

72 		int errcode;  in pt_iscache_init()  local
74 errcode = mtx_init(&iscache->lock, mtx_plain); in pt_iscache_init()
75 if (errcode != thrd_success) in pt_iscache_init()
105 int errcode; in pt_iscache_lock() local
107 errcode = mtx_lock(&iscache->lock); in pt_iscache_lock()
108 if (errcode != thrd_success) in pt_iscache_lock()
123 int errcode; in pt_iscache_unlock() local
125 errcode = mtx_unlock(&iscache->lock); in pt_iscache_unlock()
126 if (errcode != thrd_success) in pt_iscache_unlock()
215 int errcode; in pt_iscache_lru_free() local
220 errcode = pt_section_unmap(trash->section); in pt_iscache_lru_free()
221 if (errcode < 0) in pt_iscache_lru_free()
222 return errcode; in pt_iscache_lru_free()
272 int errcode; in pt_isache_lru_new() local
277 errcode = pt_section_memsize(section, &memsize); in pt_isache_lru_new()
278 if (errcode < 0) in pt_isache_lru_new()
279 return errcode; in pt_isache_lru_new()
288 errcode = pt_section_map_share(section); in pt_isache_lru_new()
289 if (errcode < 0) in pt_isache_lru_new()
290 return errcode; in pt_isache_lru_new()
438 int errcode; in pt_iscache_lru_clear() local
440 errcode = pt_iscache_lock(iscache); in pt_iscache_lru_clear()
441 if (errcode < 0) in pt_iscache_lru_clear()
442 return errcode; in pt_iscache_lru_clear()
448 errcode = pt_iscache_unlock(iscache); in pt_iscache_lru_clear()
449 if (errcode < 0) in pt_iscache_lru_clear()
450 return errcode; in pt_iscache_lru_clear()
530 int errcode; in pt_iscache_add() local
568 errcode = pt_section_get(section); in pt_iscache_add()
569 if (errcode < 0) in pt_iscache_add()
570 return errcode; in pt_iscache_add()
572 errcode = pt_section_attach(section, iscache); in pt_iscache_add()
573 if (errcode < 0) in pt_iscache_add()
576 errcode = pt_iscache_lock(iscache); in pt_iscache_add()
577 if (errcode < 0) in pt_iscache_add()
604 errcode = match; in pt_iscache_add()
622 errcode = pt_iscache_unlock(iscache); in pt_iscache_add()
623 if (errcode < 0) in pt_iscache_add()
626 errcode = pt_section_detach(section, iscache); in pt_iscache_add()
627 if (errcode < 0) in pt_iscache_add()
630 errcode = pt_section_put(section); in pt_iscache_add()
631 if (errcode < 0) in pt_iscache_add()
632 return errcode; in pt_iscache_add()
647 errcode = pt_section_get(sec); in pt_iscache_add()
648 if (errcode < 0) in pt_iscache_add()
651 errcode = pt_iscache_unlock(iscache); in pt_iscache_add()
652 if (errcode < 0) { in pt_iscache_add()
657 errcode = pt_section_detach(section, iscache); in pt_iscache_add()
658 if (errcode < 0) { in pt_iscache_add()
663 errcode = pt_section_attach(sec, iscache); in pt_iscache_add()
664 if (errcode < 0) { in pt_iscache_add()
669 errcode = pt_iscache_lock(iscache); in pt_iscache_add()
670 if (errcode < 0) { in pt_iscache_add()
683 errcode = pt_iscache_lru_remove(iscache, section); in pt_iscache_add()
684 if (errcode < 0) { in pt_iscache_add()
692 errcode = pt_section_put(section); in pt_iscache_add()
693 if (errcode < 0) { in pt_iscache_add()
710 errcode = -pte_internal; in pt_iscache_add()
714 errcode = pt_iscache_expand(iscache); in pt_iscache_add()
715 if (errcode < 0) in pt_iscache_add()
720 errcode = -pte_internal; in pt_iscache_add()
735 errcode = pt_iscache_unlock(iscache); in pt_iscache_add()
736 if (errcode < 0) in pt_iscache_add()
737 return errcode; in pt_iscache_add()
753 return errcode; in pt_iscache_add()
760 int errcode, isid; in pt_iscache_find() local
762 errcode = pt_iscache_lock(iscache); in pt_iscache_find()
763 if (errcode < 0) in pt_iscache_find()
764 return errcode; in pt_iscache_find()
768 errcode = pt_iscache_unlock(iscache); in pt_iscache_find()
769 if (errcode < 0) in pt_iscache_find()
770 return errcode; in pt_iscache_find()
779 int errcode, status; in pt_iscache_lookup() local
793 errcode = pt_iscache_lock(iscache); in pt_iscache_lookup()
794 if (errcode < 0) in pt_iscache_lookup()
795 return errcode; in pt_iscache_lookup()
809 errcode = pt_iscache_unlock(iscache); in pt_iscache_lookup()
810 if (errcode < 0) in pt_iscache_lookup()
811 return errcode; in pt_iscache_lookup()
821 int errcode; in pt_iscache_clear() local
826 errcode = pt_iscache_lock(iscache); in pt_iscache_clear()
827 if (errcode < 0) in pt_iscache_clear()
828 return errcode; in pt_iscache_clear()
840 errcode = pt_iscache_unlock(iscache); in pt_iscache_clear()
841 if (errcode < 0) in pt_iscache_clear()
842 return errcode; in pt_iscache_clear()
844 errcode = pt_iscache_lru_free(lru); in pt_iscache_clear()
845 if (errcode < 0) in pt_iscache_clear()
846 return errcode; in pt_iscache_clear()
856 errcode = pt_section_detach(section, iscache); in pt_iscache_clear()
857 if (errcode < 0) in pt_iscache_clear()
858 return errcode; in pt_iscache_clear()
860 errcode = pt_section_put(section); in pt_iscache_clear()
861 if (errcode < 0) in pt_iscache_clear()
862 return errcode; in pt_iscache_clear()
892 int errcode, status; in pt_iscache_set_limit() local
900 errcode = pt_iscache_lock(iscache); in pt_iscache_set_limit()
901 if (errcode < 0) in pt_iscache_set_limit()
902 return errcode; in pt_iscache_set_limit()
908 errcode = pt_iscache_unlock(iscache); in pt_iscache_set_limit()
910 if (errcode < 0 || status < 0) in pt_iscache_set_limit()
911 return (status < 0) ? status : errcode; in pt_iscache_set_limit()
929 int errcode, match, isid; in pt_iscache_add_file() local
934 errcode = pt_iscache_lock(iscache); in pt_iscache_add_file()
935 if (errcode < 0) in pt_iscache_add_file()
936 return errcode; in pt_iscache_add_file()
957 errcode = pt_iscache_unlock(iscache); in pt_iscache_add_file()
958 if (errcode < 0) in pt_iscache_add_file()
959 return errcode; in pt_iscache_add_file()
966 errcode = pt_section_get(section); in pt_iscache_add_file()
967 if (errcode < 0) { in pt_iscache_add_file()
969 return errcode; in pt_iscache_add_file()
972 errcode = pt_iscache_unlock(iscache); in pt_iscache_add_file()
973 if (errcode < 0) { in pt_iscache_add_file()
975 return errcode; in pt_iscache_add_file()
978 errcode = pt_iscache_unlock(iscache); in pt_iscache_add_file()
979 if (errcode < 0) in pt_iscache_add_file()
980 return errcode; in pt_iscache_add_file()
983 errcode = pt_mk_section(&section, filename, offset, size); in pt_iscache_add_file()
984 if (errcode < 0) in pt_iscache_add_file()
985 return errcode; in pt_iscache_add_file()
994 errcode = pt_section_put(section); in pt_iscache_add_file()
995 if (errcode < 0) in pt_iscache_add_file()
996 return errcode; in pt_iscache_add_file()
1007 int errcode, status; in pt_iscache_read() local
1012 errcode = pt_iscache_lookup(iscache, &section, &laddr, isid); in pt_iscache_read()
1013 if (errcode < 0) in pt_iscache_read()
1014 return errcode; in pt_iscache_read()
1023 errcode = pt_section_map(section); in pt_iscache_read()
1024 if (errcode < 0) { in pt_iscache_read()
1026 return errcode; in pt_iscache_read()
1037 errcode = pt_section_unmap(section); in pt_iscache_read()
1038 if (errcode < 0) { in pt_iscache_read()
1040 return errcode; in pt_iscache_read()
1043 errcode = pt_section_put(section); in pt_iscache_read()
1044 if (errcode < 0) in pt_iscache_read()
1045 return errcode; in pt_iscache_read()
1054 int errcode, status; in pt_iscache_notify_map() local
1058 errcode = pt_iscache_lock(iscache); in pt_iscache_notify_map()
1059 if (errcode < 0) in pt_iscache_notify_map()
1060 return errcode; in pt_iscache_notify_map()
1066 errcode = pt_iscache_unlock(iscache); in pt_iscache_notify_map()
1068 if (errcode < 0 || status < 0) in pt_iscache_notify_map()
1069 return (status < 0) ? status : errcode; in pt_iscache_notify_map()
1078 int errcode, status; in pt_iscache_notify_resize() local
1082 errcode = pt_iscache_lock(iscache); in pt_iscache_notify_resize()
1083 if (errcode < 0) in pt_iscache_notify_resize()
1084 return errcode; in pt_iscache_notify_resize()
1090 errcode = pt_iscache_unlock(iscache); in pt_iscache_notify_resize()
1092 if (errcode < 0 || status < 0) in pt_iscache_notify_resize()
1093 return (status < 0) ? status : errcode; in pt_iscache_notify_resize()