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

1990/1128/port/devproc.c (diff list | history)

1990/1126/sys/src/9/port/devproc.c:5,131990/1128/sys/src/9/port/devproc.c:5,10 (short | long | prev | next)
1990/0227    
#include	"fns.h" 
#include	"errno.h" 
 
1990/1110    
/* BUG mips only TAKE IT OUT */ 
#include	"io.h" 
                 
1990/0227    
#include	"devtab.h" 
 
enum{ 
1990/1126/sys/src/9/port/devproc.c:34,401990/1128/sys/src/9/port/devproc.c:31,37
1990/0227    
/* 
1990/11211    
 * Qids are, in path: 
1990/0227    
 *	 4 bits of file type (qids above) 
1990/11211    
 *	24 bits of process slot number + 1 
1990/1128    
 *	23 bits of process slot number + 1 
1990/11211    
 *	     in vers, 
 *	32 bits of pid, for consistency checking 
 * If notepg, c->pgrpid.path is pgrp slot, .vers is pgrpid. 
1990/1126/sys/src/9/port/devproc.c:42,481990/1128/sys/src/9/port/devproc.c:39,45
1990/0227    
#define	NPROC	(sizeof procdir/sizeof(Dirtab)) 
#define	QSHIFT	4	/* location in qid of proc slot # */ 
1990/11211    
#define	QID(q)	(((q).path&0x0000000F)>>0) 
#define	SLOT(q)	((((q).path&0x0FFFFFFF0)>>QSHIFT)-1) 
1990/1128    
#define	SLOT(q)	((((q).path&0x07FFFFFF0)>>QSHIFT)-1) 
1990/11211    
#define	PID(q)	((q).vers) 
1990/0227    
 
int 


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