have to protect acct_process from acctwatch closing the vnode
[unix-history] / usr / src / include / struct.h
CommitLineData
3cc64cba 1/*-
56559b70
KB
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
3cc64cba
KB
4 *
5 * %sccs.include.redist.c%
6 *
56559b70 7 * @(#)struct.h 8.1 (Berkeley) %G%
e8453270
SL
8 */
9
d2b7358e
KB
10#ifndef _STRUCT_H_
11#define _STRUCT_H_
12
3cc64cba
KB
13/* Offset of the field in the structure. */
14#define fldoff(name, field) \
15 ((int)&(((struct name *)0)->field))
16
17/* Size of the field in the structure. */
18#define fldsiz(name, field) \
19 (sizeof(((struct name *)0)->field))
20
21/* Address of the structure from a field. */
22#define strbase(name, addr, field) \
23 ((struct name *)((char *)(addr) - fldoff(name, field)))
d2b7358e
KB
24
25#endif /* !_STRUCT_H_ */