Lines Matching refs:errcode
117 int errcode; in pt_mk_section() local
119 errcode = mtx_init(§ion->lock, mtx_plain); in pt_mk_section()
120 if (errcode != thrd_success) { in pt_mk_section()
125 errcode = mtx_init(§ion->alock, mtx_plain); in pt_mk_section()
126 if (errcode != thrd_success) { in pt_mk_section()
146 int errcode; in pt_section_lock() local
148 errcode = mtx_lock(§ion->lock); in pt_section_lock()
149 if (errcode != thrd_success) in pt_section_lock()
164 int errcode; in pt_section_unlock() local
166 errcode = mtx_unlock(§ion->lock); in pt_section_unlock()
167 if (errcode != thrd_success) in pt_section_unlock()
182 int errcode; in pt_section_lock_attach() local
184 errcode = mtx_lock(§ion->alock); in pt_section_lock_attach()
185 if (errcode != thrd_success) in pt_section_lock_attach()
200 int errcode; in pt_section_unlock_attach() local
202 errcode = mtx_unlock(§ion->alock); in pt_section_unlock_attach()
203 if (errcode != thrd_success) in pt_section_unlock_attach()
213 int errcode, ucount; in pt_section_get() local
218 errcode = pt_section_lock(section); in pt_section_get()
219 if (errcode < 0) in pt_section_get()
220 return errcode; in pt_section_get()
224 errcode = pt_section_unlock(section); in pt_section_get()
225 if (errcode < 0) in pt_section_get()
226 return errcode; in pt_section_get()
236 int errcode, ucount; in pt_section_put() local
241 errcode = pt_section_lock(section); in pt_section_put()
242 if (errcode < 0) in pt_section_put()
243 return errcode; in pt_section_put()
247 errcode = pt_section_unlock(section); in pt_section_put()
248 if (errcode < 0) in pt_section_put()
249 return errcode; in pt_section_put()
265 int errcode, ucount, acount; in pt_section_attach() local
270 errcode = pt_section_lock_attach(section); in pt_section_attach()
271 if (errcode < 0) in pt_section_attach()
272 return errcode; in pt_section_attach()
310 int errcode, ucount, acount; in pt_section_detach() local
315 errcode = pt_section_lock_attach(section); in pt_section_detach()
316 if (errcode < 0) in pt_section_detach()
317 return errcode; in pt_section_detach()
345 int errcode, status; in pt_section_map() local
350 errcode = pt_section_map_share(section); in pt_section_map()
351 if (errcode < 0) in pt_section_map()
352 return errcode; in pt_section_map()
354 errcode = pt_section_lock_attach(section); in pt_section_map()
355 if (errcode < 0) in pt_section_map()
356 return errcode; in pt_section_map()
363 errcode = pt_section_unlock_attach(section); in pt_section_map()
365 return (status < 0) ? status : errcode; in pt_section_map()
370 int errcode, mcount; in pt_section_map_share() local
375 errcode = pt_section_lock(section); in pt_section_map_share()
376 if (errcode < 0) in pt_section_map_share()
377 return errcode; in pt_section_map_share()
381 errcode = pt_section_unlock(section); in pt_section_map_share()
382 if (errcode < 0) in pt_section_map_share()
383 return errcode; in pt_section_map_share()
393 int errcode, mcount; in pt_section_unmap() local
398 errcode = pt_section_lock(section); in pt_section_unmap()
399 if (errcode < 0) in pt_section_unmap()
400 return errcode; in pt_section_unmap()
405 errcode = pt_section_unlock(section); in pt_section_unmap()
406 if (errcode < 0) in pt_section_unmap()
407 return errcode; in pt_section_unmap()
419 int errcode; in pt_section_request_bcache() local
424 errcode = pt_section_lock_attach(section); in pt_section_request_bcache()
425 if (errcode < 0) in pt_section_request_bcache()
426 return errcode; in pt_section_request_bcache()
428 errcode = pt_section_lock(section); in pt_section_request_bcache()
429 if (errcode < 0) in pt_section_request_bcache()
438 errcode = pt_section_unlock(section); in pt_section_request_bcache()
439 if (errcode < 0) in pt_section_request_bcache()
444 errcode = pt_iscache_notify_resize(iscache, section, memsize); in pt_section_request_bcache()
445 if (errcode < 0) in pt_section_request_bcache()
457 return errcode; in pt_section_request_bcache()
557 int errcode; in dfix_init() local
559 errcode = pt_mk_section(§ion, "some-filename", in dfix_init()
562 ptu_int_eq(errcode, 0); in dfix_init()
573 int errcode; in cfix_init() local
577 errcode = pt_iscache_init(&cfix->iscache, NULL); in cfix_init()
578 ptu_int_eq(errcode, 0); in cfix_init()
602 int idx, errcode; in cfix_fini() local
617 errcode = pt_section_put(cfix->section[idx]); in cfix_fini()
618 ptu_int_eq(errcode, 0); in cfix_fini()
627 int errcode; in init_null() local
629 errcode = pt_iscache_init(NULL, NULL); in init_null()
630 ptu_int_eq(errcode, -pte_internal); in init_null()
656 int errcode; in add_null() local
658 errcode = pt_iscache_add(NULL, §ion, 0ull); in add_null()
659 ptu_int_eq(errcode, -pte_internal); in add_null()
661 errcode = pt_iscache_add(&iscache, NULL, 0ull); in add_null()
662 ptu_int_eq(errcode, -pte_internal); in add_null()
669 int errcode; in find_null() local
671 errcode = pt_iscache_find(NULL, "filename", 0ull, 0ull, 0ull); in find_null()
672 ptu_int_eq(errcode, -pte_internal); in find_null()
682 int errcode; in lookup_null() local
684 errcode = pt_iscache_lookup(NULL, §ion, &laddr, 0); in lookup_null()
685 ptu_int_eq(errcode, -pte_internal); in lookup_null()
687 errcode = pt_iscache_lookup(&iscache, NULL, &laddr, 0); in lookup_null()
688 ptu_int_eq(errcode, -pte_internal); in lookup_null()
690 errcode = pt_iscache_lookup(&iscache, §ion, NULL, 0); in lookup_null()
691 ptu_int_eq(errcode, -pte_internal); in lookup_null()
698 int errcode; in clear_null() local
700 errcode = pt_iscache_clear(NULL); in clear_null()
701 ptu_int_eq(errcode, -pte_internal); in clear_null()
716 int errcode; in add_file_null() local
718 errcode = pt_iscache_add_file(NULL, "filename", 0ull, 0ull, 0ull); in add_file_null()
719 ptu_int_eq(errcode, -pte_invalid); in add_file_null()
721 errcode = pt_iscache_add_file(&iscache, NULL, 0ull, 0ull, 0ull); in add_file_null()
722 ptu_int_eq(errcode, -pte_invalid); in add_file_null()
731 int errcode; in read_null() local
733 errcode = pt_iscache_read(NULL, &buffer, sizeof(buffer), 1ull, 0ull); in read_null()
734 ptu_int_eq(errcode, -pte_invalid); in read_null()
736 errcode = pt_iscache_read(&iscache, NULL, sizeof(buffer), 1ull, 0ull); in read_null()
737 ptu_int_eq(errcode, -pte_invalid); in read_null()
739 errcode = pt_iscache_read(&iscache, &buffer, 0ull, 1, 0ull); in read_null()
740 ptu_int_eq(errcode, -pte_invalid); in read_null()
795 int errcode; in add_no_name() local
799 errcode = pt_iscache_add(&cfix->iscache, §ion, 0ull); in add_no_name()
800 ptu_int_eq(errcode, -pte_internal); in add_no_name()
868 int errcode; in find_null_filename() local
870 errcode = pt_iscache_find(&cfix->iscache, NULL, 0ull, 0ull, 0ull); in find_null_filename()
871 ptu_int_eq(errcode, -pte_internal); in find_null_filename()
934 int errcode, isid; in lookup() local
939 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid); in lookup()
940 ptu_int_eq(errcode, 0); in lookup()
944 errcode = pt_section_put(section); in lookup()
945 ptu_int_eq(errcode, 0); in lookup()
954 int errcode, isid; in lookup_bad_isid() local
959 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, 0); in lookup_bad_isid()
960 ptu_int_eq(errcode, -pte_bad_image); in lookup_bad_isid()
962 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, -isid); in lookup_bad_isid()
963 ptu_int_eq(errcode, -pte_bad_image); in lookup_bad_isid()
965 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid + 1); in lookup_bad_isid()
966 ptu_int_eq(errcode, -pte_bad_image); in lookup_bad_isid()
973 int errcode; in clear_empty() local
975 errcode = pt_iscache_clear(&cfix->iscache); in clear_empty()
976 ptu_int_eq(errcode, 0); in clear_empty()
984 int errcode, found, isid; in clear_find() local
992 errcode = pt_iscache_clear(&cfix->iscache); in clear_find()
993 ptu_int_eq(errcode, 0); in clear_find()
1007 int errcode, isid; in clear_lookup() local
1012 errcode = pt_iscache_clear(&cfix->iscache); in clear_lookup()
1013 ptu_int_eq(errcode, 0); in clear_lookup()
1015 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid); in clear_lookup()
1016 ptu_int_eq(errcode, -pte_bad_image); in clear_lookup()
1602 int isid, errcode; in worker_add() local
1609 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add()
1611 if (errcode < 0) in worker_add()
1612 return errcode; in worker_add()
1629 errcode = pt_section_put(section); in worker_add()
1630 if (errcode < 0) in worker_add()
1631 return errcode; in worker_add()
1658 int isid, errcode; in worker_add_file() local
1665 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add_file()
1667 if (errcode < 0) in worker_add_file()
1668 return errcode; in worker_add_file()
1679 errcode = pt_section_put(section); in worker_add_file()
1680 if (errcode < 0) in worker_add_file()
1681 return errcode; in worker_add_file()
1717 int it, sec, errcode, lim; in worker_map_limit() local
1727 errcode = pt_section_map(cfix->section[sec]); in worker_map_limit()
1728 if (errcode < 0) in worker_map_limit()
1729 return errcode; in worker_map_limit()
1731 errcode = pt_section_unmap(cfix->section[sec]); in worker_map_limit()
1732 if (errcode < 0) in worker_map_limit()
1733 return errcode; in worker_map_limit()
1742 errcode = pt_iscache_set_limit(&cfix->iscache, limit); in worker_map_limit()
1743 if (errcode < 0) in worker_map_limit()
1744 return errcode; in worker_map_limit()
1799 int isid, errcode; in worker_add_map() local
1807 errcode = pt_section_map(section); in worker_add_map()
1808 if (errcode < 0) in worker_add_map()
1809 return errcode; in worker_add_map()
1811 errcode = pt_section_unmap(section); in worker_add_map()
1812 if (errcode < 0) in worker_add_map()
1813 return errcode; in worker_add_map()
1832 int isid, errcode; in worker_add_clear() local
1840 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_clear()
1841 if (errcode < 0) in worker_add_clear()
1842 return errcode; in worker_add_clear()
1860 int isid, errcode; in worker_add_file_map() local
1871 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add_file_map()
1873 if (errcode < 0) in worker_add_file_map()
1874 return errcode; in worker_add_file_map()
1879 errcode = pt_section_map(section); in worker_add_file_map()
1880 if (errcode < 0) in worker_add_file_map()
1881 return errcode; in worker_add_file_map()
1883 errcode = pt_section_unmap(section); in worker_add_file_map()
1884 if (errcode < 0) in worker_add_file_map()
1885 return errcode; in worker_add_file_map()
1902 int isid, errcode; in worker_add_file_clear() local
1916 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_file_clear()
1917 if (errcode < 0) in worker_add_file_clear()
1918 return errcode; in worker_add_file_clear()
1927 int errcode; in stress() local
1938 errcode = worker(cfix); in stress()
1939 ptu_int_eq(errcode, 0); in stress()