add prototypes for file table ops
[unix-history] / usr / src / sys / miscfs / specfs / specdev.h
CommitLineData
88859601
KM
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
6dc0e27a 5 * %sccs.include.redist.c%
88859601 6 *
6dc0e27a 7 * @(#)specdev.h 7.2 (Berkeley) %G%
88859601
KM
8 */
9
10/*
11 * This structure defines the information maintained about
12 * special devices. It is allocated in checkalias and freed
13 * in vgone.
14 */
15struct specinfo {
16 struct vnode **si_hashchain;
17 struct vnode *si_specnext;
18 long si_flags;
19 dev_t si_rdev;
20};
21/*
22 * Exported shorthand
23 */
24#define v_rdev v_specinfo->si_rdev
25#define v_hashchain v_specinfo->si_hashchain
26#define v_specnext v_specinfo->si_specnext
27#define v_specflags v_specinfo->si_flags
28
29/*
30 * Flags for specinfo
31 */
32#define SI_MOUNTEDON 0x0001 /* block special device is mounted on */
33
34/*
35 * Special device management
36 */
37#define SPECHSZ 64
38#if ((SPECHSZ&(SPECHSZ-1)) == 0)
39#define SPECHASH(rdev) (((rdev>>5)+(rdev))&(SPECHSZ-1))
40#else
41#define SPECHASH(rdev) (((unsigned)((rdev>>5)+(rdev)))%SPECHSZ)
42#endif
43
44struct vnode *speclisth[SPECHSZ];