Commit Graph

47 Commits

Author SHA1 Message Date
pooka 61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
ad abf0cf7ccd Merge from vmlocking. 2007-11-06 21:59:43 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
pooka f5ba107ccd Introduce WILLMAKE for vnode operations which create a new vnode.
Insert a KASSERT along the return path of such operations to check
that the operation set the vnode size.
2007-07-22 21:26:53 +00:00
pooka d89a0720df Generate preprocessor macros for vop offsets in vfs op descs. And
use these symbols in the desc structures instead of magic numbers.
No functional change, except VOP_FOO_DESCOFFSET macros in vnode_if.h.

wrstuden ok
2006-11-30 21:06:29 +00:00
elad 215bd95ba4 integrate kauth. 2006-05-14 21:15:11 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej aae7b1614d Generate ANSI function decls. 2005-12-07 00:45:57 +00:00
thorpej e3dec5c260 Remove the VNODE_OP_NOINLINE option. We now NEVER inline vnode ops.
Briefly discussed on tech-kern not too long ago.
2005-12-07 00:42:03 +00:00
perry f05ce97c60 remove some trailing spaces in generated output when removing $s from $NetBSD$ 2005-02-26 22:06:38 +00:00
perry deef459f67 Change the DO NOT EDIT warning slightly, including the text "DO NOT EDIT".
(It is nice if all files that should not be edited have DO NOT EDIT in them.)
2005-02-26 21:40:45 +00:00
perry da8abec863 nuke trailing whitespace 2005-02-26 21:34:55 +00:00
thorpej 11afd11faa Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.
2004-09-21 03:10:35 +00:00
hannken d7f6cbf8bc Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:02:04 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
lukem d8dd7943fe add RCSID to generated .c file 2001-11-12 14:34:24 +00:00
lukem e1adc31453 delint: vop_default_desc was declared const but not defined const. 2001-05-07 08:46:02 +00:00
jdolecek 950412b4f5 when generating individual *_desc, generate also proper offsets so that
then don't need to be patched at runtime
add new define VNODE_OPS_COUNT (to vnode_if.h) so that the number is known
at compile-time
make stuff const, it now can be
2001-01-22 09:52:21 +00:00
martin c9803fbf98 Remove over-const-ification.
This structures are actually modified at kernel init time by vfs_op_init.

XXX - looks like the state after initialization is pretty const and with
some magic in the generator script (and appropriate changes to vfs_op_init)
it could be made const.
2001-01-19 12:22:56 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
fvdl 8eaf6e8d8e Make that defined(LKM) || defined(_LKM), to catch both the cases
of compiling a kernel with LKM support and compiling an LKM.
2000-12-22 20:05:35 +00:00
fvdl 2ac441ddfb LKM -> _LKM around opt_ include. 2000-12-22 20:00:16 +00:00
mrg 80ab63644e redo the previous correctly 2000-12-22 15:09:46 +00:00
mrg 62230909f1 avoid redefinition of VNODE_OP_NOINLINE 2000-12-22 14:58:39 +00:00
thorpej 7f3e4b0331 If building an LKM, always cause it to use the non-inline version
of the vnode ops, and if LKM support is included in the kernel,
always include the non-inline stubs regardless of whether or not
they're being used in the static kernel iamge.
2000-09-13 16:09:27 +00:00
thorpej 9d482308b1 Allow the VOP_*() calls to be un-inlined with the VNODE_OP_NOINLINE
kernel option.  Saves 36k of kernel text on an i386 GENERIC.  Useful
for install media kernels, small memory systems, embedded systems.
2000-09-13 15:50:26 +00:00
wrstuden 99a1c75bcb Update syntax to support WILLUNLOCK and WILLPUT syntax. Change calls which
really vput to indicate that rather than just WILLRELE.
1999-07-07 23:32:50 +00:00
christos 34cb71bf00 Quote the backquotes in the double-quoted shell string, otherwise they
disappear and you get AS IS'' instead of ``AS IS'' in the generated files.
1998-09-13 14:44:34 +00:00
mycroft d588e17601 __Namespace__ __protection__. 1998-07-30 00:46:01 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej b59d427988 Add RCS IDs to generated files, in correct place. 1998-01-09 06:40:43 +00:00
thorpej 5713d318b8 Back out RCS ID related changes. 1998-01-08 01:06:50 +00:00
perry 02e9346e57 fix RCS ids insertion so it really works 1998-01-05 19:13:04 +00:00
perry 9b0894473d make script insert RCS ids into generated files 1998-01-05 18:45:02 +00:00
cgd 6542ece8e1 mark prototypes for static inline functions in the generated files as
possibly unused (with __attribute__ ((unused))), to avoid generating
warnings when compiling without optimization but with most ports' default
warning flags.
1997-07-07 20:17:36 +00:00
mikel bd71be635d add multiple inclusion protection to generated header 1997-01-22 06:51:59 +00:00
cgd 3d67685d36 Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them.  From PR 2142, OK'd
by mycroft.
1996-02-29 20:54:58 +00:00
chopps b3f539b09c add prototypes before each inline 1995-03-10 04:13:52 +00:00
cgd ec29b60850 gwr's slightly cleaner way to do that last... 1994-08-25 03:04:28 +00:00
cgd 5009183daf make output a bit cleaner, to satisfy mckusick. 1994-08-11 21:57:38 +00:00
cgd d7fc64af84 don't use inline, use __inline, like cdefs intends (so it can kill it if nongcc 1994-07-15 22:29:22 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
gwr 2ce572b18e Get rid if 'set -f' (at Adam's request). It is unnecessary,
and not supported by sh on some systems (i.e. Ultrix).
1994-06-15 18:13:31 +00:00
gwr e52b4481b3 No longer requires GNU awk (plain "nawk" is OK).
New AWK parser is simpler and makes better use of arrays.
1994-06-15 15:49:03 +00:00
mycroft 699bbb84b6 Update to 4.4-Lite fs code. 1994-06-08 11:28:29 +00:00