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

1993/0321/port/devmnt.c (diff list | history)

1993/0304/sys/src/9/port/devmnt.c:29,351993/0321/sys/src/9/port/devmnt.c:29,35 (short | long | prev | next)
1991/0911    
	Mntrpc	*queue;		/* Queue of pending requests on this channel */ 
	int	id;		/* Multiplexor id for channel check */ 
	Mnt	*list;		/* Free list */ 
	char	mux;		/* Set if the device aleady does the multiplexing */ 
1993/0321    
	char	mux;		/* Set if the device does the multiplexing */ 
1991/0926    
	int	blocksize;	/* read/write block size */ 
1992/0305    
	ushort	flushtag;	/* Tag to send flush on */ 
	ushort	flushbase;	/* Base tag of flush window for this buffer */ 
1993/0304/sys/src/9/port/devmnt.c:65,701993/0321/sys/src/9/port/devmnt.c:65,71
1992/0825    
void	mountmux(Mnt*, Mntrpc*); 
void	mountrpc(Mnt*, Mntrpc*); 
int	rpcattn(Mntrpc*); 
1993/0321    
void	mclose(Mnt*); 
1990/0227    
 
1991/0911    
enum 
1990/0303    
{ 
1993/0304/sys/src/9/port/devmnt.c:91,971993/0321/sys/src/9/port/devmnt.c:92,98
1991/0911    
mntattach(char *muxattach) 
1990/0227    
{ 
1992/0620    
	Mnt *m; 
1992/0320    
	Chan *c; 
1993/0321    
	Chan *c, *mc; 
1990/0227    
	struct bogus{ 
		Chan	*chan; 
		char	*spec; 
1993/0304/sys/src/9/port/devmnt.c:114,1191993/0321/sys/src/9/port/devmnt.c:115,121
1991/0911    
			unlock(m);	 
		} 
1991/0901    
	} 
1993/0321    
 
1991/0911    
	m = mntalloc.mntfree; 
1992/0620    
	if(m != 0) 
		mntalloc.mntfree = m->list;	 
1993/0304/sys/src/9/port/devmnt.c:151,1631993/0321/sys/src/9/port/devmnt.c:153,173
1990/0227    
	unlock(m); 
1990/0604    
 
1992/0320    
	if(waserror()) { 
		close(m->c); 
1992/0325    
		if(decref(m) == 0) 
			mntpntfree(m); 
1993/0321    
		mclose(m); 
1992/0320    
		nexterror(); 
	} 
 
	c = mattach(m, bogus.spec, bogus.serv); 
1993/0321    
 
	mc = m->c; 
	if(mc->type == devno('M', 0)) { 
		c->mntptr = mc->mntptr; 
		c->mchan = c->mntptr->c; 
		c->mqid = c->qid; 
		incref(c->mntptr); 
		mclose(m); 
	} 
 
1992/0320    
	poperror(); 
	return c; 
1991/0911    
} 
1993/0304/sys/src/9/port/devmnt.c:391,4111993/0321/sys/src/9/port/devmnt.c:401,428
1991/1004    
} 
 
void 
mntdoclunk(Mnt *m, Mntrpc *r) 
1993/0321    
mclose(Mnt *m) 
1991/1004    
{ 
	Mntrpc *q; 
1993/0321    
	Mntrpc *q, *r; 
1991/1004    
 
	mntfree(r); 
	if(decref(m) == 0) { 
		for(q = m->queue; q; q = r) { 
			r = q->list; 
			q->flushed = 0; 
			mntfree(q); 
		} 
		m->id = 0; 
		close(m->c); 
1992/0320    
		mntpntfree(m); 
1991/1004    
	} 
1993/0321    
	if(decref(m) != 0) 
		return; 
 
	for(q = m->queue; q; q = r) { 
		r = q->list; 
		q->flushed = 0; 
		mntfree(q); 
	} 
	m->id = 0; 
	close(m->c); 
	mntpntfree(m); 
} 
 
void 
mntdoclunk(Mnt *m, Mntrpc *r) 
{ 
	mntfree(r); 
	mclose(m); 
1992/0320    
} 
 
void 


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