Lines Matching refs:errcode

48 	int errcode;  in pt_mk_section()  local
65 errcode = pt_section_mk_status(&status, &fsize, fname); in pt_mk_section()
66 if (errcode < 0) in pt_mk_section()
71 errcode = -pte_invalid; in pt_mk_section()
82 errcode = -pte_nomem; in pt_mk_section()
96 errcode = mtx_init(&section->lock, mtx_plain); in pt_mk_section()
97 if (errcode != thrd_success) { in pt_mk_section()
100 errcode = -pte_bad_lock; in pt_mk_section()
104 errcode = mtx_init(&section->alock, mtx_plain); in pt_mk_section()
105 if (errcode != thrd_success) { in pt_mk_section()
109 errcode = -pte_bad_lock; in pt_mk_section()
123 return errcode; in pt_mk_section()
133 int errcode; in pt_section_lock() local
135 errcode = mtx_lock(&section->lock); in pt_section_lock()
136 if (errcode != thrd_success) in pt_section_lock()
151 int errcode; in pt_section_unlock() local
153 errcode = mtx_unlock(&section->lock); in pt_section_unlock()
154 if (errcode != thrd_success) in pt_section_unlock()
182 int errcode; in pt_section_get() local
187 errcode = pt_section_lock(section); in pt_section_get()
188 if (errcode < 0) in pt_section_get()
189 return errcode; in pt_section_get()
205 int errcode; in pt_section_put() local
210 errcode = pt_section_lock(section); in pt_section_put()
211 if (errcode < 0) in pt_section_put()
212 return errcode; in pt_section_put()
221 errcode = pt_section_unlock(section); in pt_section_put()
222 if (errcode < 0) in pt_section_put()
223 return errcode; in pt_section_put()
239 int errcode; in pt_section_lock_attach() local
241 errcode = mtx_lock(&section->alock); in pt_section_lock_attach()
242 if (errcode != thrd_success) in pt_section_lock_attach()
257 int errcode; in pt_section_unlock_attach() local
259 errcode = mtx_unlock(&section->alock); in pt_section_unlock_attach()
260 if (errcode != thrd_success) in pt_section_unlock_attach()
272 int errcode; in pt_section_attach() local
277 errcode = pt_section_lock_attach(section); in pt_section_attach()
278 if (errcode < 0) in pt_section_attach()
279 return errcode; in pt_section_attach()
318 int errcode; in pt_section_detach() local
323 errcode = pt_section_lock_attach(section); in pt_section_detach()
324 if (errcode < 0) in pt_section_detach()
325 return errcode; in pt_section_detach()
391 int errcode; in pt_section_memsize_locked() local
405 errcode = memsize(section, &msize); in pt_section_memsize_locked()
406 if (errcode < 0) in pt_section_memsize_locked()
407 return errcode; in pt_section_memsize_locked()
409 errcode = pt_section_bcache_memsize(section, &bcsize); in pt_section_memsize_locked()
410 if (errcode < 0) in pt_section_memsize_locked()
411 return errcode; in pt_section_memsize_locked()
420 int errcode, status; in pt_section_memsize() local
422 errcode = pt_section_lock(section); in pt_section_memsize()
423 if (errcode < 0) in pt_section_memsize()
424 return errcode; in pt_section_memsize()
428 errcode = pt_section_unlock(section); in pt_section_memsize()
429 if (errcode < 0) in pt_section_memsize()
430 return errcode; in pt_section_memsize()
449 int errcode; in pt_section_alloc_bcache() local
473 errcode = pt_section_lock_attach(section); in pt_section_alloc_bcache()
474 if (errcode < 0) in pt_section_alloc_bcache()
475 return errcode; in pt_section_alloc_bcache()
477 errcode = pt_section_lock(section); in pt_section_alloc_bcache()
478 if (errcode < 0) in pt_section_alloc_bcache()
483 errcode = 0; in pt_section_alloc_bcache()
489 errcode = -pte_nomem; in pt_section_alloc_bcache()
501 errcode = pt_section_memsize_locked(section, &memsize); in pt_section_alloc_bcache()
502 if (errcode < 0) in pt_section_alloc_bcache()
505 errcode = pt_section_unlock(section); in pt_section_alloc_bcache()
506 if (errcode < 0) in pt_section_alloc_bcache()
512 errcode = pt_iscache_notify_resize(iscache, section, in pt_section_alloc_bcache()
514 if (errcode < 0) in pt_section_alloc_bcache()
527 return errcode; in pt_section_alloc_bcache()
533 int errcode, status; in pt_section_on_map_lock() local
538 errcode = pt_section_lock_attach(section); in pt_section_on_map_lock()
539 if (errcode < 0) in pt_section_on_map_lock()
540 return errcode; in pt_section_on_map_lock()
555 errcode = pt_section_unlock_attach(section); in pt_section_on_map_lock()
556 if (errcode < 0) in pt_section_on_map_lock()
557 return errcode; in pt_section_on_map_lock()
565 int errcode; in pt_section_map_share() local
570 errcode = pt_section_lock(section); in pt_section_map_share()
571 if (errcode < 0) in pt_section_map_share()
572 return errcode; in pt_section_map_share()
594 int errcode, status; in pt_section_unmap() local
599 errcode = pt_section_lock(section); in pt_section_unmap()
600 if (errcode < 0) in pt_section_unmap()
601 return errcode; in pt_section_unmap()
605 errcode = -pte_nomap; in pt_section_unmap()
613 errcode = -pte_internal; in pt_section_unmap()
622 errcode = pt_section_unlock(section); in pt_section_unmap()
623 if (errcode < 0) in pt_section_unmap()
624 return errcode; in pt_section_unmap()
630 return errcode; in pt_section_unmap()