Lines Matching defs:so
44 * if so set up the required state (all done by sod_rcv_init()).
46 * queue is empty, so the first thing we do is drain any previously
64 sod_rcv_init(struct sonode *so, int flags, struct uio **uiopp)
68 sodirect_t *sodp = so->so_direct;
76 mutex_enter(&so->so_lock);
80 !so->so_proto_props.sopp_loopback && so->so_filter_active == 0 &&
81 !(so->so_state & SS_CANTRCVMORE)) {
85 * and not EOF so initialize the sodirect_t uioa_t with "uiop".
89 * Successful uioainit() so the uio_t part of the
102 * queued M_DATA mblk_t(s) so it will be done later.
106 mutex_exit(&so->so_lock);
116 sod_rcv_done(struct sonode *so, struct uio *suiop, struct uio *uiop)
119 sodirect_t *sodp = so->so_direct;
126 ASSERT(MUTEX_HELD(&so->so_lock));
166 * so disable uioa such that this and any additional
219 * free list tail mblk_t, if any, else empty list so new head.
256 sod_uioa_so_init(struct sonode *so, struct sodirect_s *sodp, struct uio *uiop)
266 ASSERT(MUTEX_HELD(&so->so_lock));
273 bp = so->so_rcv_q_head;
290 if (len > uioap->uio_resid || (so->so_oobmark > 0 &&
291 len + uioap->uioa_mbytes >= so->so_oobmark)) {
319 bp = so->so_rcv_head;
332 * current mblk_t chain in 2 so that all the uioamove()ed mblk_t(s)
343 so->so_rcv_q_last_head = wbp;
345 so->so_rcv_last_head = wbp;
357 sod_sock_init(struct sonode *so)
361 ASSERT(so->so_direct == NULL);
363 so->so_state |= SS_SODIRECT;
375 so->so_direct = sodp;
379 sod_sock_fini(struct sonode *so)
381 sodirect_t *sodp = so->so_direct;
385 so->so_direct = NULL;
403 sod_uioa_mblk(struct sonode *so, mblk_t *mp)
405 sodirect_t *sodp = so->so_direct;
408 ASSERT(MUTEX_HELD(&so->so_lock));
415 if (mp == NULL && so->so_rcv_q_head != NULL) {
416 mp = so->so_rcv_q_head;
419 so->so_rcv_q_head = mp->b_next;
420 if (so->so_rcv_q_head == NULL) {
421 so->so_rcv_q_last_head = NULL;
428 if (so->so_rcv_q_head == NULL && so->so_rcv_head != NULL &&
429 DB_TYPE(so->so_rcv_head) == M_DATA &&
430 (DB_FLAGS(so->so_rcv_head) & DBLK_UIOA)) {
432 ASSERT(so->so_rcv_q_head == NULL);
433 mp = so->so_rcv_head;
434 so->so_rcv_head = mp->b_next;
435 if (so->so_rcv_head == NULL)
436 so->so_rcv_last_head = NULL;
442 if (so->so_rcv_q_head != NULL) {
443 mblk_t *m = so->so_rcv_q_head;
452 if (so->so_rcv_head != NULL) {
453 mblk_t *m = so->so_rcv_head;