pavel
934634a18c
Change the process/lwp flags seen by userland via sysctl back to the
...
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.
Restores source compatibility with pre-newlock2 tools like ps or top.
Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00
ad
b07ec3fc38
Merge newlock2 to head.
2007-02-09 21:55:00 +00:00
yamt
1a7bc55dcc
remove some __unused from function parameters.
2006-11-01 10:17:58 +00:00
dogcow
372e6ef309
now that we have -Wno-unused-parameter, back out all the tremendously ugly
...
code to gratuitously access said parameters.
2006-10-17 18:21:29 +00:00
dogcow
2023789a40
More -Wunused fallout. sprinkle __unused when possible; otherwise, use the
...
do { if (&x) {} } while (/* CONSTCOND */ 0);
construct as suggested by uwe in <20061012224845.GA9449@snark.ptc.spbu.ru>.
2006-10-13 16:53:35 +00:00
christos
4d595fd7b1
- sprinkle __unused on function decls.
...
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
oster
1d51ed695f
Re-work some of the initialization code to now use config_attach_pseudo()
...
and friends. Addresses PR#32881. BOOT_FROM_RAID_HOOKS dies.
More simplification possible now.
2006-10-08 02:39:01 +00:00
dogcow
85a1c8c4ca
make powerhook_establish use const char*, not char *. This solves lots of
...
gcc pointer whining. Since there's one LKM that uses this function, though,
it's kernel version bump time.
2006-09-24 06:51:39 +00:00
jmcneill
f135e0d607
Add "name" parameter to powerhook_establish, to aid debugging. No objections
...
on tech-kern@
2006-09-24 03:53:07 +00:00
christos
2e1a2f9d5e
comment out impossible comparison
2006-09-02 06:30:53 +00:00
matt
7e0679149d
Properly deal with/without ktrace/ptrace/systrace
2006-09-01 21:24:50 +00:00
christos
0b7fa73e66
fix a stray \n
2006-08-12 21:46:03 +00:00
christos
adddcaa6ee
Fix the dump printing too.
2006-08-12 20:27:35 +00:00
christos
f7cf5ff3b4
Only print the partition letter if the device supports partitions.
2006-08-12 19:58:55 +00:00
yamt
696edc2b76
use ASSERT_SLEEPABLE where appropriate.
2006-07-21 10:08:41 +00:00
ad
2b79369c7e
- Hold a reference to the process credentials in each struct lwp.
...
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
rjs
4ba88d2489
Add includes of opt_multiprocessor.h and opt_lockdebug.h where missing.
2006-06-11 07:32:18 +00:00
thorpej
39cd836ee1
Use device_unit().
2006-03-28 17:38:24 +00:00
yamt
7935de6ea7
use UIO_SETUP_SYSSPACE instead of using vmspace_kernel() directly.
2006-03-13 08:52:07 +00:00
yamt
0969bf3261
copyin_vmspace, copyout_vmspace: set uio_vmspace correctly.
...
from Christos Zoulas.
2006-03-13 03:17:47 +00:00
yamt
33f0a013e3
fix copyout_proc after yamt-uio_vmspace merge. from Christos Zoulas.
2006-03-12 09:47:08 +00:00
thorpej
61dd49d3bc
Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
...
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
2006-03-07 07:21:50 +00:00
thorpej
be8b235384
Clean up fallout proc_is_traced_p() change:
...
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
christos
33db6ebb5e
always define proc, not just when ktrace and systrace are defined.
2006-03-06 02:17:53 +00:00
christos
a4495f4cec
implement PT_SYSCALL
2006-03-05 07:21:37 +00:00
cube
0666ca366e
Fix md(4) like raid(4) was fixed.
2006-03-01 22:12:09 +00:00
yamt
ec5a93183a
merge yamt-uio_vmspace branch.
...
- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
thorpej
d1f18238ca
Use device_is_a().
2006-02-27 02:59:24 +00:00
thorpej
58853410ae
Use device_class() instead of accessing dv_class directly.
2006-02-21 04:32:38 +00:00
chs
0545b6e0cb
changes for making DIAGNOSTIC not change the kernel ABI:
...
- for structure fields that are conditionally present,
make those fields always present.
- for functions which are conditionally inline, make them never inline.
- remove some other functions which are conditionally defined but
don't actually do anything anymore.
- make a lock-debugging function conditional on only LOCKDEBUG.
as discussed on tech-kern some time back.
2005-12-27 04:06:45 +00:00
chs
36bb975558
hold kernel_lock while calling systrace_exit().
...
fixes PR 25856.
2005-12-27 00:27:34 +00:00
perry
144515ce1a
u_intN_t -> uintN_t
2005-12-26 18:41:36 +00:00
christos
95e1ffb156
merge ktrace-lwp.
2005-12-11 12:16:03 +00:00
reinoud
f4a3f04cb2
Create functions ioctl_copyin() and ioctl_copyout(). They are meant to be
...
used in ioctl routines to do the right thing when the FKIOCTL flag is
passed to the IOCTL routine indicating its a in-kernel VOP_IOCTL call and
indirect addresses provided in the arguments are to be seen as kernel
adresses rather than userland adresses.
A simple substitution and prepending of the `flags' passed on to the ioctl
handler is enough to DTRT.
2005-08-28 20:58:14 +00:00
christos
de124326cb
Make copy{in,out}_proc work on all processes (including curproc) by
...
special-casing the curproc case. Use copy{in,out}_proc directly instead
of checking for curproc each time. Discussed with thorpej.
2005-07-06 22:30:42 +00:00
thorpej
73c9fbb0e6
Use ANSI function decls. Apply some static.
2005-06-23 23:15:12 +00:00
christos
efb6943313
- add const.
...
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.
2005-05-29 22:24:14 +00:00
matt
027c11539b
Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them.
2005-01-24 21:25:09 +00:00
cube
85c68ec88d
Add a check in DEV_USES_PARTITIONS macro in case dv->dv_cfdata is NULL,
...
as it is the case for md and raid. Raid case tested by Martin Husemann,
I could test the install floppies work again.
2004-10-24 17:06:24 +00:00
thorpej
a6be1570c7
- Centralize the declaration of booted_device and booted_partition.
...
- Add a booted_wedge variable that indicates the wedge that was booted
from. If this is NULL, booted_partition is consulted.
- Adjust setroot() and its support routines for root-on-wedges. Could
use some tidy-up, but this works for now.
2004-10-23 17:14:11 +00:00
yamt
832a9b868e
release kernel lock in uiomove().
2004-09-23 10:45:08 +00:00
matt
fde909e1a1
Add prototype for uiomove_frombuf. Change uiomove_frombuf to use size_t
...
for its length argument (to be the same as uiomove). Remove code that
dealt with length being negative.
2004-04-21 20:31:50 +00:00
itojun
d2f1c029b9
kill sprintf, use snprintf
2004-04-21 18:40:37 +00:00
junyoung
fdc32973e7
- Nuke __P().
...
- Drop trailing spaces.
2004-03-23 13:22:32 +00:00
christos
cde926b610
PR/24745: Jared Momose: kernel prompts for a root device when using md_root
2004-03-11 15:17:55 +00:00
simonb
6d85c5e0d5
Don't pass the (unused) return value args to the
...
trace_enter()/systrace_enter() functions.
2003-10-31 03:28:12 +00:00
christos
2017bf9a94
Fix uninitialized variable warning
2003-10-25 18:31:59 +00:00
yamt
966ada0097
assert that uio passed to uiomove() has valid uio_iovcnt.
2003-09-14 11:12:14 +00:00
yamt
50401b2019
use curcpu() rather than curlwp->l_cpu.
2003-09-10 10:55:50 +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