~kris/9p

9hist

ref: 9d02ff8da8e544a041c005c5c73edcb96f7eceb1 9hist/power/segment.h -rw-r--r-- 547 bytes
9d02ff8d — David du Colombier Plan 9 from Bell Labs 1991-11-27 34 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Attach segment types
 */

typedef struct Physseg Physseg;
struct Physseg
{
	ulong	attr;			/* Segment attributes */
	char	*name;			/* Attach name */
	ulong	pa;			/* Physical address */
	ulong	size;			/* Maximum segment size in pages */
	Page	*(*pgalloc)(ulong);	/* Allocation if we need it */
	void	(*pgfree)(Page*);
}physseg[] = {
	{ SG_PHYSICAL,	"lock",		0,	1024*BY2PG,	lkpage,		lkpgfree },
	{ SG_SHARED,	"shared",	0,	SEGMAXSIZE,	snewpage, 	putpage },
	{ SG_BSS,	"memory",	0,	SEGMAXSIZE,	snewpage,	putpage },
	{ 0,		0,		0,	0,		0,		0 	},
};