Lines Matching full:parent
201 struct net_buf *parent, in bt_buf_make_view() argument
210 __ASSERT_NO_MSG(net_buf_headroom(parent) > 0); in bt_buf_make_view()
212 __ASSERT_NO_MSG(!bt_buf_has_view(parent)); in bt_buf_make_view()
216 net_buf_simple_clone(&parent->b, &view->b); in bt_buf_make_view()
217 view->size = net_buf_headroom(parent) + len; in bt_buf_make_view()
221 /* we have a view, eat `len`'s worth of data from the parent */ in bt_buf_make_view()
222 (void)net_buf_pull(parent, len); in bt_buf_make_view()
224 meta->backup.data = parent->data; in bt_buf_make_view()
225 parent->data = NULL; in bt_buf_make_view()
227 meta->backup.size = parent->size; in bt_buf_make_view()
228 parent->size = 0; in bt_buf_make_view()
230 /* The ref to `parent` is moved in by passing `parent` as argument. */ in bt_buf_make_view()
232 meta->parent = parent; in bt_buf_make_view()
233 parent = NULL; in bt_buf_make_view()
241 __ASSERT_NO_MSG(meta->parent); in bt_buf_destroy_view()
243 /* "unclip" the parent buf */ in bt_buf_destroy_view()
244 meta->parent->data = meta->backup.data; in bt_buf_destroy_view()
245 meta->parent->size = meta->backup.size; in bt_buf_destroy_view()
247 net_buf_unref(meta->parent); in bt_buf_destroy_view()
253 bool bt_buf_has_view(const struct net_buf *parent) in bt_buf_has_view() argument
256 return parent->size == 0 && parent->data == NULL; in bt_buf_has_view()