Lines Matching refs:errcode
116 int errcode; in pt_mk_section() local
118 errcode = mtx_init(§ion->lock, mtx_plain); in pt_mk_section()
119 if (errcode != thrd_success) { in pt_mk_section()
124 errcode = mtx_init(§ion->alock, mtx_plain); in pt_mk_section()
125 if (errcode != thrd_success) { in pt_mk_section()
144 int errcode; in pt_section_lock() local
146 errcode = mtx_lock(§ion->lock); in pt_section_lock()
147 if (errcode != thrd_success) in pt_section_lock()
162 int errcode; in pt_section_unlock() local
164 errcode = mtx_unlock(§ion->lock); in pt_section_unlock()
165 if (errcode != thrd_success) in pt_section_unlock()
180 int errcode; in pt_section_lock_attach() local
182 errcode = mtx_lock(§ion->alock); in pt_section_lock_attach()
183 if (errcode != thrd_success) in pt_section_lock_attach()
198 int errcode; in pt_section_unlock_attach() local
200 errcode = mtx_unlock(§ion->alock); in pt_section_unlock_attach()
201 if (errcode != thrd_success) in pt_section_unlock_attach()
211 int errcode, ucount; in pt_section_get() local
216 errcode = pt_section_lock(section); in pt_section_get()
217 if (errcode < 0) in pt_section_get()
218 return errcode; in pt_section_get()
222 errcode = pt_section_unlock(section); in pt_section_get()
223 if (errcode < 0) in pt_section_get()
224 return errcode; in pt_section_get()
234 int errcode, ucount; in pt_section_put() local
239 errcode = pt_section_lock(section); in pt_section_put()
240 if (errcode < 0) in pt_section_put()
241 return errcode; in pt_section_put()
245 errcode = pt_section_unlock(section); in pt_section_put()
246 if (errcode < 0) in pt_section_put()
247 return errcode; in pt_section_put()
263 int errcode, ucount, acount; in pt_section_attach() local
268 errcode = pt_section_lock_attach(section); in pt_section_attach()
269 if (errcode < 0) in pt_section_attach()
270 return errcode; in pt_section_attach()
308 int errcode, ucount, acount; in pt_section_detach() local
313 errcode = pt_section_lock_attach(section); in pt_section_detach()
314 if (errcode < 0) in pt_section_detach()
315 return errcode; in pt_section_detach()
343 int errcode, status; in pt_section_map() local
348 errcode = pt_section_map_share(section); in pt_section_map()
349 if (errcode < 0) in pt_section_map()
350 return errcode; in pt_section_map()
352 errcode = pt_section_lock_attach(section); in pt_section_map()
353 if (errcode < 0) in pt_section_map()
354 return errcode; in pt_section_map()
361 errcode = pt_section_unlock_attach(section); in pt_section_map()
363 return (status < 0) ? status : errcode; in pt_section_map()
368 int errcode, mcount; in pt_section_map_share() local
373 errcode = pt_section_lock(section); in pt_section_map_share()
374 if (errcode < 0) in pt_section_map_share()
375 return errcode; in pt_section_map_share()
379 errcode = pt_section_unlock(section); in pt_section_map_share()
380 if (errcode < 0) in pt_section_map_share()
381 return errcode; in pt_section_map_share()
391 int errcode, mcount; in pt_section_unmap() local
396 errcode = pt_section_lock(section); in pt_section_unmap()
397 if (errcode < 0) in pt_section_unmap()
398 return errcode; in pt_section_unmap()
403 errcode = pt_section_unlock(section); in pt_section_unmap()
404 if (errcode < 0) in pt_section_unmap()
405 return errcode; in pt_section_unmap()
417 int errcode; in pt_section_request_bcache() local
422 errcode = pt_section_lock_attach(section); in pt_section_request_bcache()
423 if (errcode < 0) in pt_section_request_bcache()
424 return errcode; in pt_section_request_bcache()
426 errcode = pt_section_lock(section); in pt_section_request_bcache()
427 if (errcode < 0) in pt_section_request_bcache()
436 errcode = pt_section_unlock(section); in pt_section_request_bcache()
437 if (errcode < 0) in pt_section_request_bcache()
442 errcode = pt_iscache_notify_resize(iscache, section, memsize); in pt_section_request_bcache()
443 if (errcode < 0) in pt_section_request_bcache()
455 return errcode; in pt_section_request_bcache()
569 int errcode; in cfix_init() local
573 errcode = pt_iscache_init(&cfix->iscache, NULL); in cfix_init()
574 ptu_int_eq(errcode, 0); in cfix_init()
598 int idx, errcode; in cfix_fini() local
613 errcode = pt_section_put(cfix->section[idx]); in cfix_fini()
614 ptu_int_eq(errcode, 0); in cfix_fini()
623 int errcode; in init_null() local
625 errcode = pt_iscache_init(NULL, NULL); in init_null()
626 ptu_int_eq(errcode, -pte_internal); in init_null()
652 int errcode; in add_null() local
654 errcode = pt_iscache_add(NULL, §ion, 0ull); in add_null()
655 ptu_int_eq(errcode, -pte_internal); in add_null()
657 errcode = pt_iscache_add(&iscache, NULL, 0ull); in add_null()
658 ptu_int_eq(errcode, -pte_internal); in add_null()
665 int errcode; in find_null() local
667 errcode = pt_iscache_find(NULL, "filename", 0ull, 0ull, 0ull); in find_null()
668 ptu_int_eq(errcode, -pte_internal); in find_null()
678 int errcode; in lookup_null() local
680 errcode = pt_iscache_lookup(NULL, §ion, &laddr, 0); in lookup_null()
681 ptu_int_eq(errcode, -pte_internal); in lookup_null()
683 errcode = pt_iscache_lookup(&iscache, NULL, &laddr, 0); in lookup_null()
684 ptu_int_eq(errcode, -pte_internal); in lookup_null()
686 errcode = pt_iscache_lookup(&iscache, §ion, NULL, 0); in lookup_null()
687 ptu_int_eq(errcode, -pte_internal); in lookup_null()
694 int errcode; in clear_null() local
696 errcode = pt_iscache_clear(NULL); in clear_null()
697 ptu_int_eq(errcode, -pte_internal); in clear_null()
712 int errcode; in add_file_null() local
714 errcode = pt_iscache_add_file(NULL, "filename", 0ull, 0ull, 0ull); in add_file_null()
715 ptu_int_eq(errcode, -pte_invalid); in add_file_null()
717 errcode = pt_iscache_add_file(&iscache, NULL, 0ull, 0ull, 0ull); in add_file_null()
718 ptu_int_eq(errcode, -pte_invalid); in add_file_null()
727 int errcode; in read_null() local
729 errcode = pt_iscache_read(NULL, &buffer, sizeof(buffer), 1ull, 0ull); in read_null()
730 ptu_int_eq(errcode, -pte_invalid); in read_null()
732 errcode = pt_iscache_read(&iscache, NULL, sizeof(buffer), 1ull, 0ull); in read_null()
733 ptu_int_eq(errcode, -pte_invalid); in read_null()
735 errcode = pt_iscache_read(&iscache, &buffer, 0ull, 1, 0ull); in read_null()
736 ptu_int_eq(errcode, -pte_invalid); in read_null()
791 int errcode; in add_no_name() local
795 errcode = pt_iscache_add(&cfix->iscache, §ion, 0ull); in add_no_name()
796 ptu_int_eq(errcode, -pte_internal); in add_no_name()
864 int errcode; in find_null_filename() local
866 errcode = pt_iscache_find(&cfix->iscache, NULL, 0ull, 0ull, 0ull); in find_null_filename()
867 ptu_int_eq(errcode, -pte_internal); in find_null_filename()
930 int errcode, isid; in lookup() local
935 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid); in lookup()
936 ptu_int_eq(errcode, 0); in lookup()
940 errcode = pt_section_put(section); in lookup()
941 ptu_int_eq(errcode, 0); in lookup()
950 int errcode, isid; in lookup_bad_isid() local
955 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, 0); in lookup_bad_isid()
956 ptu_int_eq(errcode, -pte_bad_image); in lookup_bad_isid()
958 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, -isid); in lookup_bad_isid()
959 ptu_int_eq(errcode, -pte_bad_image); in lookup_bad_isid()
961 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid + 1); in lookup_bad_isid()
962 ptu_int_eq(errcode, -pte_bad_image); in lookup_bad_isid()
969 int errcode; in clear_empty() local
971 errcode = pt_iscache_clear(&cfix->iscache); in clear_empty()
972 ptu_int_eq(errcode, 0); in clear_empty()
980 int errcode, found, isid; in clear_find() local
988 errcode = pt_iscache_clear(&cfix->iscache); in clear_find()
989 ptu_int_eq(errcode, 0); in clear_find()
1003 int errcode, isid; in clear_lookup() local
1008 errcode = pt_iscache_clear(&cfix->iscache); in clear_lookup()
1009 ptu_int_eq(errcode, 0); in clear_lookup()
1011 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid); in clear_lookup()
1012 ptu_int_eq(errcode, -pte_bad_image); in clear_lookup()
1598 int isid, errcode; in worker_add() local
1605 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add()
1607 if (errcode < 0) in worker_add()
1608 return errcode; in worker_add()
1625 errcode = pt_section_put(section); in worker_add()
1626 if (errcode < 0) in worker_add()
1627 return errcode; in worker_add()
1654 int isid, errcode; in worker_add_file() local
1661 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add_file()
1663 if (errcode < 0) in worker_add_file()
1664 return errcode; in worker_add_file()
1675 errcode = pt_section_put(section); in worker_add_file()
1676 if (errcode < 0) in worker_add_file()
1677 return errcode; in worker_add_file()
1713 int it, sec, errcode, lim; in worker_map_limit() local
1723 errcode = pt_section_map(cfix->section[sec]); in worker_map_limit()
1724 if (errcode < 0) in worker_map_limit()
1725 return errcode; in worker_map_limit()
1727 errcode = pt_section_unmap(cfix->section[sec]); in worker_map_limit()
1728 if (errcode < 0) in worker_map_limit()
1729 return errcode; in worker_map_limit()
1738 errcode = pt_iscache_set_limit(&cfix->iscache, limit); in worker_map_limit()
1739 if (errcode < 0) in worker_map_limit()
1740 return errcode; in worker_map_limit()
1795 int isid, errcode; in worker_add_map() local
1803 errcode = pt_section_map(section); in worker_add_map()
1804 if (errcode < 0) in worker_add_map()
1805 return errcode; in worker_add_map()
1807 errcode = pt_section_unmap(section); in worker_add_map()
1808 if (errcode < 0) in worker_add_map()
1809 return errcode; in worker_add_map()
1828 int isid, errcode; in worker_add_clear() local
1836 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_clear()
1837 if (errcode < 0) in worker_add_clear()
1838 return errcode; in worker_add_clear()
1856 int isid, errcode; in worker_add_file_map() local
1867 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add_file_map()
1869 if (errcode < 0) in worker_add_file_map()
1870 return errcode; in worker_add_file_map()
1875 errcode = pt_section_map(section); in worker_add_file_map()
1876 if (errcode < 0) in worker_add_file_map()
1877 return errcode; in worker_add_file_map()
1879 errcode = pt_section_unmap(section); in worker_add_file_map()
1880 if (errcode < 0) in worker_add_file_map()
1881 return errcode; in worker_add_file_map()
1898 int isid, errcode; in worker_add_file_clear() local
1912 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_file_clear()
1913 if (errcode < 0) in worker_add_file_clear()
1914 return errcode; in worker_add_file_clear()
1923 int errcode; in stress() local
1934 errcode = worker(cfix); in stress()
1935 ptu_int_eq(errcode, 0); in stress()