Commit Graph

111 Commits

Author SHA1 Message Date
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
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
thorpej fcecc153fe Use aprint_normal() for the non-error (and thus non-interative) case
of mounting the root file system.
2003-05-17 22:22:41 +00:00
itojun f265a4a4da use strlcpy. [fixed off-by-one in subr_prop.c] 2003-05-16 14:25:02 +00:00
dsl 88b103687c ktrace rval[1] - in order to get both fd numbers for pipe() 2003-05-15 12:56:16 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
thorpej 3ff1552cc5 Add "fork hooks", a'la "exec hooks" and "exit hooks" which allow
subsystems to do special processing to the parent and/or child at
fork time.
2003-01-24 01:42:52 +00:00
thorpej e0d8d366df Merge the nathanw_sa branch. 2003-01-18 10:06:22 +00:00
manu 4a06119a9d Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
2002-12-21 16:23:56 +00:00
uebayasi c041971257 Fix compilation errors introduced by recent trace_enter()/ktrsyscall() changes.
Provided by FUKAUMI Naoki <naoki at fukaumi dot org> in kern/19070.
2002-11-16 07:40:38 +00:00
jdolecek c771eafacf add comments for trace_enter()/trace_exit(); particularily comment
expected value of 'code'
2002-11-11 10:43:54 +00:00
drochner 20d06f6b17 SI prefixes apply to decimal multiplies only. For binary (2^n) multiplies
the most "officially looking" is IEC 60027-2, ie "Ki", "Mi", ...,
which is not too popular, and which would require more code changes.
So stick with the traditional capital "K" for (divisor==1024), and use
the SI "k" otherwise (ie (divisor==1000)).
2002-09-27 18:37:43 +00:00
wiz 079c182094 Kilo abbreviation is a small k (PR 18408). 2002-09-26 15:06:47 +00:00
simonb 2a2b50a0d1 Don't return values in a couple of void functions. 2002-09-23 03:37:59 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
matt 48bbf5f234 Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.
2002-09-04 01:32:31 +00:00
thorpej 556e3c90c4 Fix a signed/unsigned comparison warning from GCC 3.3. 2002-08-25 22:32:02 +00:00
thorpej c57c6b52cb Make uiomove()'s count argument a size_t rather than an int. 2002-08-25 22:28:40 +00:00
thorpej f02cb5ee27 Make hashinit() use unsigned quantities throughout. 2002-08-25 20:01:12 +00:00
matt 2d290eb699 Use the qtype_FOREACH macros. Print out address of hook that could not
be disestablished.
2002-08-23 20:50:25 +00:00
thorpej 67b2a0cf06 * Add copyin_proc() and copyout_proc(), which are like copyin() and
copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.
2002-07-20 03:58:24 +00:00
christos acf2d4083d Niels Provos systrace work, ported to NetBSD by kittenz and reworked... 2002-06-17 16:22:50 +00:00
christos f7d98e2451 - merge all the hook insertion and deletion code so that we don't create
a fourth copy.
- add exithook to be executed when a process exits.
2002-03-17 22:19:20 +00:00
simonb 9a942a34e0 Don't use local extern declarations for the mountroot variable or
declare local prototypes for nfs_mountroot() or md_root_setconf().
2002-03-04 02:25:21 +00:00
thorpej 7380aa1467 Add a "ddb" command (if DDB is configured into the kernel) for
easy, convenient dropping into DDB at the "root device: " prompt.
Useful if your console can't do it w/o actually taking an interrupt
and you want to, say, look at the boot messages.
2002-02-08 00:58:58 +00:00
lukem adc783d537 add RCSIDs 2001-11-12 15:25:01 +00:00
thorpej 9ec2953eef Make "reboot" an option at the root device/filesystem prompt (we
already had a "halt").
2001-05-27 01:29:50 +00:00
cgd 926244ff0d nuke extra token (;) after #endif 2001-01-12 22:55:10 +00:00
fvdl 538c381225 findblkname is not static (and is in fact used outside this file). 2000-12-10 14:14:15 +00:00
takemura 3c9d9276dc Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
2000-11-26 11:08:57 +00:00
ad 5fcf59fd7c Allow for creation of both LIST and TAILQ based hashes by adding a `hash
type' argument to hashinit().
2000-11-08 14:25:23 +00:00
augustss 72afbf03cf Run power hooks in reverse installation order when powering down and
installation order when powering up.  This allows drivers in a hierarchy
to DTRT.
2000-07-26 12:24:52 +00:00
enami 52a5cc1c5e Make this file compile with DIAGNOSTIC. 2000-05-31 06:18:03 +00:00
thorpej 956b3ca3b3 Track which process a CPU is running/has last run on by adding a
p_cpu member to struct proc.  Use this in certain places when
accessing scheduler state, etc.  For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.

While I'm here, comment a few places where there are known issues
for the SMP implementation.
2000-05-31 05:02:31 +00:00
enami ec808c5ba9 Make this file compiles with !DIAGNOSTIC. 2000-05-27 01:43:27 +00:00
thorpej a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
enami c6f0aaa60f Check malloc failure. 2000-05-10 02:16:15 +00:00
enami 007d263ce9 Cosmetic change. 2000-05-10 02:14:41 +00:00
itojun e6469f14ad move static function getstr() to cons.c, make it publically available
as cngetsn().  there will be other consumer.
2000-05-08 16:30:57 +00:00
augustss 264f1d27c6 Get rid of register declarations. 2000-03-30 09:27:11 +00:00
thorpej 7c8b72d592 uiomove(): if we're informed that we should yield the CPU, use the new
preempt() primitive to do so.
2000-03-23 20:39:58 +00:00