usr/src/uts/common/os/streamio.c
changeset 898 64b2a371a6bd
parent 741 40027a3621ac
child 1907 9fa74bf5ef05
equal deleted inserted replaced
897:8bc35ca89c2f 898:64b2a371a6bd
   368 	stp->sd_pgidp = NULL;
   368 	stp->sd_pgidp = NULL;
   369 	stp->sd_vnode = vp;
   369 	stp->sd_vnode = vp;
   370 	stp->sd_rerror = 0;
   370 	stp->sd_rerror = 0;
   371 	stp->sd_werror = 0;
   371 	stp->sd_werror = 0;
   372 	stp->sd_wroff = 0;
   372 	stp->sd_wroff = 0;
       
   373 	stp->sd_tail = 0;
   373 	stp->sd_iocblk = NULL;
   374 	stp->sd_iocblk = NULL;
   374 	stp->sd_pushcnt = 0;
   375 	stp->sd_pushcnt = 0;
   375 	stp->sd_qn_minpsz = 0;
   376 	stp->sd_qn_minpsz = 0;
   376 	stp->sd_qn_maxpsz = INFPSZ - 1;	/* used to check for initialization */
   377 	stp->sd_qn_maxpsz = INFPSZ - 1;	/* used to check for initialization */
   377 	stp->sd_maxblk = INFPSZ;
   378 	stp->sd_maxblk = INFPSZ;
  2267 				stp->sd_copyflag |= STRCOPYCACHED;
  2268 				stp->sd_copyflag |= STRCOPYCACHED;
  2268 			}
  2269 			}
  2269 		}
  2270 		}
  2270 		if (sop->so_flags & SO_WROFF)
  2271 		if (sop->so_flags & SO_WROFF)
  2271 			stp->sd_wroff = sop->so_wroff;
  2272 			stp->sd_wroff = sop->so_wroff;
       
  2273 		if (sop->so_flags & SO_TAIL)
       
  2274 			stp->sd_tail = sop->so_tail;
  2272 		if (sop->so_flags & SO_MINPSZ)
  2275 		if (sop->so_flags & SO_MINPSZ)
  2273 			q->q_minpsz = sop->so_minpsz;
  2276 			q->q_minpsz = sop->so_minpsz;
  2274 		if (sop->so_flags & SO_MAXPSZ)
  2277 		if (sop->so_flags & SO_MAXPSZ)
  2275 			q->q_maxpsz = sop->so_maxpsz;
  2278 			q->q_maxpsz = sop->so_maxpsz;
  2276 		if (sop->so_flags & SO_MAXBLK)
  2279 		if (sop->so_flags & SO_MAXBLK)
  5882 	stream_runservice(stp);
  5885 	stream_runservice(stp);
  5883 
  5886 
  5884 	/*
  5887 	/*
  5885 	 * Timed wait for acknowledgment.  The wait time is limited by the
  5888 	 * Timed wait for acknowledgment.  The wait time is limited by the
  5886 	 * timeout value, which must be a positive integer (number of
  5889 	 * timeout value, which must be a positive integer (number of
  5887 	 * milliseconds to wait, or 0 (use default value of STRTIMOUT
  5890 	 * milliseconds) to wait, or 0 (use default value of STRTIMOUT
  5888 	 * milliseconds), or -1 (wait forever).  This will be awakened
  5891 	 * milliseconds), or -1 (wait forever).  This will be awakened
  5889 	 * either by an ACK/NAK message arriving, the timer expiring, or
  5892 	 * either by an ACK/NAK message arriving, the timer expiring, or
  5890 	 * the timer expiring on another ioctl waiting for control of the
  5893 	 * the timer expiring on another ioctl waiting for control of the
  5891 	 * mechanism.
  5894 	 * mechanism.
  5892 	 */
  5895 	 */
  7052 	 * else signals will stop being sent.
  7055 	 * else signals will stop being sent.
  7053 	 */
  7056 	 */
  7054 	stp->sd_flag |= STRGETINPROG;
  7057 	stp->sd_flag |= STRGETINPROG;
  7055 	mutex_exit(&stp->sd_lock);
  7058 	mutex_exit(&stp->sd_lock);
  7056 
  7059 
       
  7060 	if ((stp->sd_rputdatafunc != NULL) && (DB_TYPE(bp) == M_DATA) &&
       
  7061 	    (!(DB_FLAGS(bp) & DBLK_COOKED))) {
       
  7062 
       
  7063 		bp = (stp->sd_rputdatafunc)(
       
  7064 		    stp->sd_vnode, bp, NULL,
       
  7065 		    NULL, NULL, NULL);
       
  7066 
       
  7067 		if (bp == NULL)
       
  7068 			goto retry;
       
  7069 
       
  7070 		DB_FLAGS(bp) |= DBLK_COOKED;
       
  7071 	}
       
  7072 
  7057 	if (STREAM_NEEDSERVICE(stp))
  7073 	if (STREAM_NEEDSERVICE(stp))
  7058 		stream_runservice(stp);
  7074 		stream_runservice(stp);
  7059 
  7075 
  7060 	/*
  7076 	/*
  7061 	 * Set HIPRI flag if message is priority.
  7077 	 * Set HIPRI flag if message is priority.