Lines Matching full:seg
65 struct obj *seg[3]; member
75 } seg; member
254 struct obj *seg; in bd_md_add_seg() local
256 seg = obj_alloc(OBJ_TYPE_SEG); in bd_md_add_seg()
257 if (seg == NULL) in bd_md_add_seg()
259 seg->refcnt = 1; in bd_md_add_seg()
260 seg->parent = md; in bd_md_add_seg()
261 seg->u.seg.address = addr; in bd_md_add_seg()
262 seg->u.seg.size = size; in bd_md_add_seg()
264 md->u.md.seg[type] = seg; in bd_md_add_seg()
272 struct obj *seg, *seg0; in bd_md_del_segs() local
274 for (seg = md->u.md.seg[type]; seg != NULL; seg = seg0) { in bd_md_del_segs()
276 munmap((void *)seg->u.seg.address, seg->u.seg.size); in bd_md_del_segs()
277 seg0 = seg->u.seg.next; in bd_md_del_segs()
278 obj_free(seg); in bd_md_del_segs()
468 struct obj *md, *seg; in bd_md_first_seg() local
479 seg = md->u.md.seg[space]; in bd_md_first_seg()
480 if (seg == NULL) { in bd_md_first_seg()
484 return (seg->oid); in bd_md_first_seg()
490 struct obj *seg; in bd_md_next_seg() local
492 seg = obj_lookup(sid, OBJ_TYPE_SEG); in bd_md_next_seg()
493 if (seg == NULL) in bd_md_next_seg()
496 seg = seg->u.seg.next; in bd_md_next_seg()
497 if (seg == NULL) { in bd_md_next_seg()
501 return (seg->oid); in bd_md_next_seg()
507 struct obj *seg; in bd_seg_get_addr() local
512 seg = obj_lookup(sid, OBJ_TYPE_SEG); in bd_seg_get_addr()
513 if (seg == NULL) in bd_seg_get_addr()
516 *addr_p = seg->u.seg.address; in bd_seg_get_addr()
523 struct obj *seg; in bd_seg_get_size() local
528 seg = obj_lookup(sid, OBJ_TYPE_SEG); in bd_seg_get_size()
529 if (seg == NULL) in bd_seg_get_size()
532 *size_p = seg->u.seg.size; in bd_seg_get_size()