plan 9 kernel history: overview | file list | diff list

1990/0703/port/devmnt.c (diff list | history)

1990/0629/sys/src/9/port/devmnt.c:769,7751990/0703/sys/src/9/port/devmnt.c:769,780 (short | long | prev | next)
1990/0604    
    Read: 
		qunlock(q); 
		qlocked = 0; 
1990/0703    
		if(waserror()){ 
			mnterrdequeue(q, mh); 
			nexterror(); 
		} 
1990/0619    
		n = (*devtab[q->msg->type].read)(q->msg, mh->mbr->buf, BUFSIZE); 
1990/0703    
		poperror(); 
1990/0619    
		if(convM2S(mh->mbr->buf, &mh->rhdr, n) == 0){ 
1990/0604    
			mnterrdequeue(q, mh); 
			error(0, Ebadmsg); 
1990/0629/sys/src/9/port/devmnt.c:810,8191990/0703/sys/src/9/port/devmnt.c:815,820
1990/0604    
				wakeup(&w->r); 
				goto Read; 
			} 
1990/0629    
print("devmnt: undelivered response fid %d type %d\n", mh->rhdr.fid, mh->rhdr.type); 
print("reader pid %d fid %d type %d\n", u->p->pid, mh->thdr.fid, mh->thdr.type); 
for(w=q->writer; w; w=w->next)print("writer pid %d fid %d type %d\n",w->p->pid,w->thdr.fid,w->thdr.type); 
                 
1990/0604    
		goto Read; 
	}else{ 
		mh->p = u->p; 
1990/0629/sys/src/9/port/devmnt.c:849,8561990/0703/sys/src/9/port/devmnt.c:850,860
1990/0227    
	/* 
	 * Copy out on read 
	 */ 
	if(mh->thdr.type == Tread) 
1990/0703    
	if(mh->thdr.type == Tread){ 
		if(mh->rhdr.count > mh->thdr.count) 
			error(0, Ebadcnt); 
1990/0227    
		memcpy(mh->thdr.data, mh->rhdr.data, mh->rhdr.count); 
1990/0703    
	} 
1990/0619    
	mbfree(mh->mbr); 
1990/0227    
	mbfree(mbw); 
	poperror(); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)