]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoFix a typo: "Managment" -> "Management".
maxim [Thu, 24 Apr 2003 09:16:01 +0000 (09:16 +0000)]
Fix a typo: "Managment" -> "Management".

PR: bin/47343
Submitted by: Jeremy C. Reed <reed@reedmedia.net>
MFC after: 4 days

21 years agoo Add support for running /etc/rc.early
mtm [Thu, 24 Apr 2003 08:27:29 +0000 (08:27 +0000)]
o Add support for running /etc/rc.early
o Re-run through /etc/sysctl.conf a second time just before we set
  the securelevel.

Approved by: markm (mentor) (implicit)
Reviewed by: dougb

21 years agoMake ipfilter, ipnat, ipmon, and ipfs behave more like the old rc.
mtm [Thu, 24 Apr 2003 08:20:47 +0000 (08:20 +0000)]
Make ipfilter, ipnat, ipmon, and ipfs behave more like the old rc.
o group them together so they run one right after another
o use the NetBSD supplied ipfs script instead of tacking
  it on to the end of ipnat
o Load the ipl module in ipnat and ipfilter, if it's not already
  loaded
o In ipmon and ipnat show a warning if neither ipfilter nor
  ipnat is enabled or the ipl module is not loaded, and exit

Approved by: markm (mentor) (implicit)
Tested by: leafy <leafy@leafy.idv.tw>

21 years agoFree mount credentials (mnt_cred) when freeing the mount struct
tjr [Thu, 24 Apr 2003 08:16:06 +0000 (08:16 +0000)]
Free mount credentials (mnt_cred) when freeing the mount struct
in failure cases to avoid leaking struct ucreds, and ultimately
leaking struct uidinfo references.

21 years agoAdd some IEEE 1394 OHCI chips.
simokawa [Thu, 24 Apr 2003 07:29:52 +0000 (07:29 +0000)]
Add some IEEE 1394 OHCI chips.

Partially submitted by: Tetsuya Ryuchi <ryuchi@ryuchi.org>
PR: misc/51336

21 years ago - Move swap_pager_isswapped()'s prototype to a more logical place.
alc [Thu, 24 Apr 2003 05:29:27 +0000 (05:29 +0000)]
 - Move swap_pager_isswapped()'s prototype to a more logical place.

21 years ago - Acquire the vm_object's lock when performing vm_object_page_clean().
alc [Thu, 24 Apr 2003 04:31:25 +0000 (04:31 +0000)]
 - Acquire the vm_object's lock when performing vm_object_page_clean().
 - Add a parameter to vm_pageout_flush() that tells vm_pageout_flush()
   whether its caller has locked the vm_object.  (This is a temporary
   measure to bootstrap vm_object locking.)

21 years agoWhen filling out a kinfo_proc structure, if we come across a process
des [Thu, 24 Apr 2003 03:37:59 +0000 (03:37 +0000)]
When filling out a kinfo_proc structure, if we come across a process
whose p_stats->p_start has the magic value 1, replace it with boottime.
Some users were apparently confused by the fact that ps(1) reported a
start time in early 1970 for system processes.

21 years agoDon't print anything for fault at cpu_switch_load_gs, just like other
davidxu [Thu, 24 Apr 2003 01:48:59 +0000 (01:48 +0000)]
Don't print anything for fault at cpu_switch_load_gs, just like other
code to recover fault in doreti because of invalid segment registers,
silently push error to userland.

21 years agoDocument support for the new -s and -R command-line options, and
gad [Thu, 24 Apr 2003 01:34:40 +0000 (01:34 +0000)]
Document support for the new -s and -R command-line options, and
the 'N' flag.  These were coded in March as revisions 1.55 and 1.56
of newsyslog.c.  I intend to MFC all the matching changes next week.
This also reorganizes the description of the 'flags' field to give
list of the valid flags, instead of a long paragraph explaining
each of the possible values.

Obtained from: NetBSD (in spirit at least, for -s and N)
MFC after: 1 week

21 years agoDon't convert the kernel ident to uppercase when writing the Makefile.
des [Thu, 24 Apr 2003 00:52:58 +0000 (00:52 +0000)]
Don't convert the kernel ident to uppercase when writing the Makefile.

21 years agoTweak to previous commit: increment ifp->if_iqdrops if the m_copy() fails.
archie [Wed, 23 Apr 2003 23:45:57 +0000 (23:45 +0000)]
Tweak to previous commit: increment ifp->if_iqdrops if the m_copy() fails.

Suggested by: Neelkanth Natu <neelnatu@yahoo.com>

21 years agoSync with latest and greatest Apple sources (which, among other things, fix
jkh [Wed, 23 Apr 2003 23:42:23 +0000 (23:42 +0000)]
Sync with latest and greatest Apple sources (which, among other things, fix
the style flag).

Submitted by: Conrad Minshall <conrad@apple.com>
Reviewed by: jkh
Obtained from: Apple Computer, Inc.

21 years agoRemove obsolete compatibility ifdef.
imp [Wed, 23 Apr 2003 23:41:48 +0000 (23:41 +0000)]
Remove obsolete compatibility ifdef.

21 years agoCopy CIS3 and CIS4 strings into the kernel too.
imp [Wed, 23 Apr 2003 23:40:28 +0000 (23:40 +0000)]
Copy CIS3 and CIS4 strings into the kernel too.

PR: 51333
Submitted by: Scott Mitchell

21 years ago1. Allow drivers to query CIS strings from OLDCARD.
imp [Wed, 23 Apr 2003 23:39:21 +0000 (23:39 +0000)]
1. Allow drivers to query CIS strings from OLDCARD.
2. Include backwards compatibility good for the moment (eventually will
   be turned off in current, but allow for a short transition period).

PR: 51333
Submited by: Scott Mitchell (1)
MFC after: 2 weeks

21 years agoAdd accessor for cis4 string. Neither OLDCARD nor NEWCARD support
imp [Wed, 23 Apr 2003 23:32:53 +0000 (23:32 +0000)]
Add accessor for cis4 string.  Neither OLDCARD nor NEWCARD support
this yet, but that will change soon.

Pr: 51333
Submited by: Scott Mitchell

21 years agoAdd a macro to get the current thread mailbox pointer.
deischen [Wed, 23 Apr 2003 21:49:34 +0000 (21:49 +0000)]
Add a macro to get the current thread mailbox pointer.

21 years agoRemove the i386-specific hack (well, we only run on i386 anyways)
deischen [Wed, 23 Apr 2003 21:48:29 +0000 (21:48 +0000)]
Remove the i386-specific hack (well, we only run on i386 anyways)
to always set %gs when resuming a thread.

Install this library as libpthread instead of libkse.

21 years agoProtect thread errno from being changed while operating
deischen [Wed, 23 Apr 2003 21:46:50 +0000 (21:46 +0000)]
Protect thread errno from being changed while operating
on behalf of the KSE.

Add a kse_reinit function to reinitialize a reused KSE.

Submitted by: davidxu

21 years agoAdd a new sys/limits.h file which in turn depends on machine/_limits.h
kan [Wed, 23 Apr 2003 21:41:59 +0000 (21:41 +0000)]
Add a new sys/limits.h file which in turn depends on machine/_limits.h
to get actual constant values. This is in preparation for machine/limits.h
retirement.

Discussed on: standards@
Submitted by: Craig Rodrigues <rodrigc@attbi.com>  (*)
Modified by: kan

21 years agoIntroduce a g_waitfor_event() function which posts an event and waits for
phk [Wed, 23 Apr 2003 21:28:27 +0000 (21:28 +0000)]
Introduce a g_waitfor_event() function which posts an event and waits for
it to be run (or cancelled) and use this instead of home-rolled versions.

21 years agoDocument support for the <default> entry, which was implemented in
gad [Wed, 23 Apr 2003 21:26:12 +0000 (21:26 +0000)]
Document support for the <default> entry, which was implemented in
revision 1.50 of newsyslog.c , back in February.  I intend to MFC
those changes soon.

MFC after: 4 days

21 years agoMore of the event stuff can now be private to geom_event.c
phk [Wed, 23 Apr 2003 20:54:42 +0000 (20:54 +0000)]
More of the event stuff can now be private to geom_event.c

21 years agoRename g_call_me() to g_post_event(), and give it a flag
phk [Wed, 23 Apr 2003 20:46:12 +0000 (20:46 +0000)]
Rename g_call_me() to g_post_event(), and give it a flag
argument to determine if we can M_WAITOK in malloc.

21 years agostyle(9): use NULL when assigning/comparing a char *,
johan [Wed, 23 Apr 2003 20:33:57 +0000 (20:33 +0000)]
style(9): use NULL when assigning/comparing a char *,
  consitently compare fileid with 0 using == and !=.

Reviewed by: silence on @audit

21 years agoMake this WARNS=5 clean by adding () in 'if (a || (b && c))'.
johan [Wed, 23 Apr 2003 20:26:21 +0000 (20:26 +0000)]
Make this WARNS=5 clean by adding () in 'if (a || (b && c))'.

Look at by: sebastian.ssmoller@web.de on audit@

21 years agoRemove the now unused hardcoded g_post_event() event support.
phk [Wed, 23 Apr 2003 20:25:33 +0000 (20:25 +0000)]
Remove the now unused hardcoded g_post_event() event support.

21 years agoMake this WARNS=5 clean by using %j and (uintmax_t).
johan [Wed, 23 Apr 2003 20:24:13 +0000 (20:24 +0000)]
Make this WARNS=5 clean by using %j and (uintmax_t).

Look at by: sebastian.ssmoller@web.de on audit@

21 years agoThese are WARNS=5 clean, mark them as such to keep them that way.
johan [Wed, 23 Apr 2003 20:22:33 +0000 (20:22 +0000)]
These are WARNS=5 clean, mark them as such to keep them that way.

Look at by: sebastian.ssmoller@web.de on audit@

21 years agoUse bus_space*() instead of in*() and out*().
jhay [Wed, 23 Apr 2003 20:22:32 +0000 (20:22 +0000)]
Use bus_space*() instead of in*() and out*().

21 years agoTurn EV_NEW_PROVIDER into a g_call_me() event.
phk [Wed, 23 Apr 2003 20:16:13 +0000 (20:16 +0000)]
Turn EV_NEW_PROVIDER into a g_call_me() event.

21 years agoConvert EV_SPOILED event to use g_call_me().
phk [Wed, 23 Apr 2003 20:06:38 +0000 (20:06 +0000)]
Convert EV_SPOILED event to use g_call_me().

21 years agoRemove Giant from osigblock(), osigsetmask(), and kern_sigaltstack().
jhb [Wed, 23 Apr 2003 19:49:18 +0000 (19:49 +0000)]
Remove Giant from osigblock(), osigsetmask(), and kern_sigaltstack().

21 years agoTurn the hardwired NEW_CLASS event into a g_call_me() event.
phk [Wed, 23 Apr 2003 19:34:38 +0000 (19:34 +0000)]
Turn the hardwired NEW_CLASS event into a g_call_me() event.

21 years agoMove the shutdown eventhandler stuff to a more logical place.
phk [Wed, 23 Apr 2003 19:15:27 +0000 (19:15 +0000)]
Move the shutdown eventhandler stuff to a more logical place.

21 years agoUpdate many of the locking notes and comments for struct
jhb [Wed, 23 Apr 2003 18:54:30 +0000 (18:54 +0000)]
Update many of the locking notes and comments for struct
thread/kse/ksegroup/proc.

21 years agoThe signotify() sanity check in userret() doesn't need Giant anymore.
jhb [Wed, 23 Apr 2003 18:51:55 +0000 (18:51 +0000)]
The signotify() sanity check in userret() doesn't need Giant anymore.

21 years agoAdd lock assertions for various proc/thread/kse/ksegroup fields to the
jhb [Wed, 23 Apr 2003 18:51:05 +0000 (18:51 +0000)]
Add lock assertions for various proc/thread/kse/ksegroup fields to the
scheduler functions.

21 years ago- Reorganize osigstack() to do the copyin first, grab the proc lock once,
jhb [Wed, 23 Apr 2003 18:50:25 +0000 (18:50 +0000)]
- Reorganize osigstack() to do the copyin first, grab the proc lock once,
  do all the various sigstack dances, unlock the proc lock, and finally do
  the copyout.  This more closely resembles the behavior of
  kern_sigaltstack() and closes a small race.
- Remove Giant from osigstack as it is no longer needed.

21 years agoRemove Giant from [gs]etpriority().
jhb [Wed, 23 Apr 2003 18:48:55 +0000 (18:48 +0000)]
Remove Giant from [gs]etpriority().

21 years ago- Protect p_numthreads with the sched_lock.
jhb [Wed, 23 Apr 2003 18:46:51 +0000 (18:46 +0000)]
- Protect p_numthreads with the sched_lock.
- Protect p_singlethread with both the sched_lock and the proc lock.
- Protect p_suspcount with the proc lock.

21 years agoFix a case where the return value from m_copy() was not being checked
archie [Wed, 23 Apr 2003 18:35:40 +0000 (18:35 +0000)]
Fix a case where the return value from m_copy() was not being checked
for NULL before proceeding, causing a crash if mbufs were exhausted.

MFC after: 3 days
Reported by: Mark Gooderum <mark@verniernetworks.com>

21 years agoFix compiling in the NO_SWAPPING case.
jhb [Wed, 23 Apr 2003 18:21:41 +0000 (18:21 +0000)]
Fix compiling in the NO_SWAPPING case.

Submitted by: bde (partially)

21 years agoFix a lock order reversal. Unlock the proc before calling fget().
jhb [Wed, 23 Apr 2003 18:13:26 +0000 (18:13 +0000)]
Fix a lock order reversal.  Unlock the proc before calling fget().

Reported by: kris

21 years agoRemove Kerberos IV shims.
des [Wed, 23 Apr 2003 17:26:01 +0000 (17:26 +0000)]
Remove Kerberos IV shims.

21 years agoUpdate for 3.6.1p1; also remove Kerberos IV shims.
des [Wed, 23 Apr 2003 17:25:47 +0000 (17:25 +0000)]
Update for 3.6.1p1; also remove Kerberos IV shims.

21 years agoNit.
des [Wed, 23 Apr 2003 17:23:06 +0000 (17:23 +0000)]
Nit.

21 years agoImprovements to the proposed shell code.
des [Wed, 23 Apr 2003 17:21:55 +0000 (17:21 +0000)]
Improvements to the proposed shell code.

21 years agoRegenerate.
des [Wed, 23 Apr 2003 17:21:27 +0000 (17:21 +0000)]
Regenerate.

21 years agoResolve conflicts.
des [Wed, 23 Apr 2003 17:13:13 +0000 (17:13 +0000)]
Resolve conflicts.

21 years agoThis commit was generated by cvs2svn to compensate for changes in r113908,
des [Wed, 23 Apr 2003 16:53:02 +0000 (16:53 +0000)]
This commit was generated by cvs2svn to compensate for changes in r113908,
which included commits to RCS files with non-trunk default branches.

21 years agoVendor import of OpenSSH-portable 3.6.1p1.
des [Wed, 23 Apr 2003 16:53:02 +0000 (16:53 +0000)]
Vendor import of OpenSSH-portable 3.6.1p1.

21 years agoComment out the mixer entry for igain for the mic 20dB boost for now since
jhb [Wed, 23 Apr 2003 16:49:53 +0000 (16:49 +0000)]
Comment out the mixer entry for igain for the mic 20dB boost for now since
it can cause feedback problems on some laptops.

Reviewed by: orion

21 years agoAdd constants for USB programming interfaces. These are already defined
des [Wed, 23 Apr 2003 15:51:36 +0000 (15:51 +0000)]
Add constants for USB programming interfaces.  These are already defined
(with other names) in the USB driver sources, but I felt that pcireg.h
should have a complete list - at least of classes and interfaces that we
know about and use.

21 years agoGet rid of kvtop().
jhay [Wed, 23 Apr 2003 15:40:11 +0000 (15:40 +0000)]
Get rid of kvtop().
Change inb() and outb() to use bus_space*().

21 years agoSet appropriate tag "fsck" to logger(1) for background fsck messages.
matusita [Wed, 23 Apr 2003 15:38:02 +0000 (15:38 +0000)]
Set appropriate tag "fsck" to logger(1) for background fsck messages.

PR: 51174
Submitted by: Alex Popa <razor@ldc.ro>

21 years agoCorrect a doubled 'with'.
schweikh [Wed, 23 Apr 2003 14:28:13 +0000 (14:28 +0000)]
Correct a doubled 'with'.

21 years agoMake sure debug.log only gets debugging messages.
des [Wed, 23 Apr 2003 13:08:31 +0000 (13:08 +0000)]
Make sure debug.log only gets debugging messages.

21 years agoFix a compiler warning.
phk [Wed, 23 Apr 2003 12:15:31 +0000 (12:15 +0000)]
Fix a compiler warning.

Submitted by: David Leimbach <leimy2k@mac.com>

21 years agoaxe(4) works on pc98 maybe.
nyan [Wed, 23 Apr 2003 10:46:00 +0000 (10:46 +0000)]
axe(4) works on pc98 maybe.

21 years agoPresumably fix sparc64 "make release". (The breakage was due to
ru [Wed, 23 Apr 2003 09:01:35 +0000 (09:01 +0000)]
Presumably fix sparc64 "make release".  (The breakage was due to
sunlabel(8) no longer being linked to disklabel(8).)

Reviewed by: phk

21 years agoCorrect typo in COMPATIBILITY section: s/esycmd/esyscmd
schweikh [Wed, 23 Apr 2003 08:47:51 +0000 (08:47 +0000)]
Correct typo in COMPATIBILITY section: s/esycmd/esyscmd

21 years agoAdd testcases to ensure that overwriting bootcode does not trash label.
phk [Wed, 23 Apr 2003 08:25:44 +0000 (08:25 +0000)]
Add testcases to ensure that overwriting bootcode does not trash label.

21 years agoIf we cannot open the parent device for writing, use GEOM::CONFIG_GEOM
phk [Wed, 23 Apr 2003 08:25:20 +0000 (08:25 +0000)]
If we cannot open the parent device for writing, use GEOM::CONFIG_GEOM
requests to write label and bootcode.

The -r argument is ignored (with a warning).

With a lot of help from: jake

21 years agoImplement CONFIG_GEOM verbs "write label" and "write bootcode".
phk [Wed, 23 Apr 2003 08:23:01 +0000 (08:23 +0000)]
Implement CONFIG_GEOM verbs "write label" and "write bootcode".

21 years agoIntroduce a #define for the length of the bootloader code.
phk [Wed, 23 Apr 2003 08:04:30 +0000 (08:04 +0000)]
Introduce a #define for the length of the bootloader code.

21 years agoIntroduce gctl_get_paraml() which gets a parameter only if it has the
phk [Wed, 23 Apr 2003 08:03:47 +0000 (08:03 +0000)]
Introduce gctl_get_paraml() which gets a parameter only if it has the
right length.

21 years agoMake gctl_error() take printfline varargs.
phk [Wed, 23 Apr 2003 07:50:01 +0000 (07:50 +0000)]
Make gctl_error() take printfline varargs.

21 years agoRemove unused event pointers in object structures.
phk [Wed, 23 Apr 2003 06:54:44 +0000 (06:54 +0000)]
Remove unused event pointers in object structures.
Remove KASSERTS which checked that they were unused.

21 years agoDo not link sunlabel to disklabel.
phk [Wed, 23 Apr 2003 06:37:57 +0000 (06:37 +0000)]
Do not link sunlabel to disklabel.

21 years agoAdd /dev to the Alpha manual mount root example.
obrien [Wed, 23 Apr 2003 05:02:40 +0000 (05:02 +0000)]
Add /dev to the Alpha manual mount root example.

21 years agoThe second chdir(1) that I trimmed is needed too
ru [Wed, 23 Apr 2003 04:28:35 +0000 (04:28 +0000)]
The second chdir(1) that I trimmed is needed too
if the program has an object directory.

Explained by: Tim Kientzle <kientzle@acm.org>

21 years agoRelease the vnode interlock in nfs_flush() before calling nfs_sigintr(),
truckman [Wed, 23 Apr 2003 02:58:26 +0000 (02:58 +0000)]
Release the vnode interlock in nfs_flush() before calling nfs_sigintr(),
and grab it again later if necessary.  This prevents a lock order reversal
because nfs_sigintr() calls PROC_LOCK().

21 years agoAdd first axe(4) devices.
bmah [Tue, 22 Apr 2003 22:41:53 +0000 (22:41 +0000)]
Add first axe(4) devices.

21 years agoNew release notes: axe(4), newfs(8) -O2 default, sysinstall UFS2
bmah [Tue, 22 Apr 2003 22:40:57 +0000 (22:40 +0000)]
New release notes:  axe(4), newfs(8) -O2 default, sysinstall UFS2
default (i386,alpha,sparc64,ia64).

21 years ago``Strong typing is a crutch for people with weak memories.''
nectar [Tue, 22 Apr 2003 22:19:05 +0000 (22:19 +0000)]
``Strong typing is a crutch for people with weak memories.''

Correct a bug that should have wreaked havoc everywhere, but for
some reason only bit unlucky people who use `-march' optimizations.
The compiler cannot assist one in distinguishing between the two
function calls below.

   int nsdispatch(void *, ...);
   void *discard;

   nsdispatch(&discard, ...);  /* correct .. no, really! */
   nsdispatch(discard, ...);   /* Boom                   */

Robin provided me with a debugging environment in which I could see
what was going on.

Badness when using CPUTYPE was
Reported by: "Robin P. Blanchard" <Robin.Blanchard@gactr.uga.edu>
Reported by: nork

Sponsored by: DARPA, Network Associates Laboratories

21 years agoSet the quantum for scope system threads to 0 (no quantum).
deischen [Tue, 22 Apr 2003 21:32:32 +0000 (21:32 +0000)]
Set the quantum for scope system threads to 0 (no quantum).

21 years agoChange the locking so that the _modify function is called with topology
phk [Tue, 22 Apr 2003 21:29:58 +0000 (21:29 +0000)]
Change the locking so that the _modify function is called with topology
held.

The only place where we want to not hold topology is when we read
(or write) the label to disk: in the case of a disk error with a
long recovery time, holding topology would prevent open/close of
any disk device.

21 years agoWe don't need to have a slice->start() function.
phk [Tue, 22 Apr 2003 21:24:37 +0000 (21:24 +0000)]
We don't need to have a slice->start() function.

21 years agoDo not mandate that slicers have a private ->start(), they may not need
phk [Tue, 22 Apr 2003 21:19:17 +0000 (21:19 +0000)]
Do not mandate that slicers have a private ->start(), they may not need
one.  KASSERT() that they have one if G_SLICE_HOT_START is used.

21 years agoAdd "-r" when we initialize the label first time.
phk [Tue, 22 Apr 2003 21:04:48 +0000 (21:04 +0000)]
Add "-r" when we initialize the label first time.

Add two more tests.

21 years agoImplement handling of CONFIG_GEOM OAM request.
phk [Tue, 22 Apr 2003 21:01:46 +0000 (21:01 +0000)]
Implement handling of CONFIG_GEOM OAM request.

21 years agoAdd "CONFIG_GEOM" operation to the OAM API.
phk [Tue, 22 Apr 2003 21:00:49 +0000 (21:00 +0000)]
Add "CONFIG_GEOM" operation to the OAM API.

21 years ago- Move PS_PROFIL and its new cousin PS_STOPPROF back over to p_flag and
jhb [Tue, 22 Apr 2003 20:54:04 +0000 (20:54 +0000)]
- Move PS_PROFIL and its new cousin PS_STOPPROF back over to p_flag and
  rename them appropriately.  Protect both flags with both the proc lock
  and the sched_lock.
- Protect p_profthreads with the proc lock.
- Remove Giant from profil(2).

21 years ago- Assert that the proc lock and sched_lock are held in sched_nice().
jhb [Tue, 22 Apr 2003 20:50:38 +0000 (20:50 +0000)]
- Assert that the proc lock and sched_lock are held in sched_nice().
- For the 4BSD scheduler, this means that all callers of the static
  function resetpriority() now always hold sched_lock, so don't lock
  sched_lock explicitly in that function.

21 years agoLock both the proc lock and sched_lock when calling sched_nice since
jhb [Tue, 22 Apr 2003 20:45:38 +0000 (20:45 +0000)]
Lock both the proc lock and sched_lock when calling sched_nice since
kg_nice is now protected by both.  Being protected by both means that
other places in the kernel that want to read kg_nice only need one of the
two locks.

21 years agoAdd a working pthread_[gs]etconcurrency. Initial null implementation
deischen [Tue, 22 Apr 2003 20:29:16 +0000 (20:29 +0000)]
Add a working pthread_[gs]etconcurrency.  Initial null implementation
provided by Sergey A. Osokin <osa@freebsd.org.ru>.

In order to test this on a single CPU machine, you need to:

    sysctl kern.threads.debug=1
    sysctl kern.threads.virtual_cpu=2

21 years agoAdd a couple asserts to pthread_cond_foo to ensure the (low-level)
deischen [Tue, 22 Apr 2003 20:28:33 +0000 (20:28 +0000)]
Add a couple asserts to pthread_cond_foo to ensure the (low-level)
lock level is 0.  Thus far, the threads implementation doesn't use
mutexes or condition variables so the lock level should be 0.

Save the return value when trying to schedule a new thread and
use this to return an error from pthread_create().

Change the max sleep time for an idle KSE to 1 minute from 2 minutes.

Maintain a count of the number of KSEs within a KSEG.

With these changes scope system threads seem to work, but heavy
use of them crash the kernel (supposedly VM bugs).

21 years agoLock the proc to check p_flag and several other related tests in
jhb [Tue, 22 Apr 2003 20:03:08 +0000 (20:03 +0000)]
Lock the proc to check p_flag and several other related tests in
vm_daemon().  We don't need to hold sched_lock as long now as a result.

21 years agoPrefer the proc lock to sched_lock when testing PS_INMEM now that it is
jhb [Tue, 22 Apr 2003 20:01:56 +0000 (20:01 +0000)]
Prefer the proc lock to sched_lock when testing PS_INMEM now that it is
safe to do so.

21 years ago- Always call faultin() in _PHOLD() if PS_INMEM is clear. This closes a
jhb [Tue, 22 Apr 2003 20:00:26 +0000 (20:00 +0000)]
- Always call faultin() in _PHOLD() if PS_INMEM is clear.  This closes a
  race where a thread could assume that a process was swapped in by
  PHOLD() when it actually wasn't fully swapped in yet.
- In faultin(), always msleep() if PS_SWAPPINGIN is set instead of doing
  this check after bumping p_lock in the PS_INMEM == 0 case.  Also,
  sched_lock is only needed for setting and clearning swapping PS_*
  flags and the swap thread inhibitor.
- Don't set and clear the thread swap inhibitor in the same loops as the
  pmap_swapin/out_thread() since we have to do it under sched_lock.
  Instead, mimic the treatment of the PS_INMEM flag and use separate loops
  to set the inhibitors when clearing PS_INMEM and clear the inhibitors
  when setting PS_INMEM.
- swapout() now returns with the proc lock held as it holds the lock
  while adjusting the swapping-related PS_* flags so that the proc lock
  can be used to test those flags.
- Only use the proc lock to check the swapping-related PS_* flags in
  several places.
- faultin() no longer requires sched_lock to be held by callers.
- Rename PS_SWAPPING to PS_SWAPPINGOUT to be less ambiguous now that we
  have PS_SWAPPINGIN.

21 years agoMake this WARNS=2 clean by using %j and (uintmax_t).
johan [Tue, 22 Apr 2003 19:57:46 +0000 (19:57 +0000)]
Make this WARNS=2 clean by using %j and (uintmax_t).

Reviewed by: tjr@ on audit@
Approved by: silence from sos@

21 years agoProtect p_swtime with the sched_lock.
jhb [Tue, 22 Apr 2003 19:48:25 +0000 (19:48 +0000)]
Protect p_swtime with the sched_lock.

21 years ago- Mark the kse_purge_group() and kse_purge() definitions static to match
jhb [Tue, 22 Apr 2003 19:47:55 +0000 (19:47 +0000)]
- Mark the kse_purge_group() and kse_purge() definitions static to match
  their prototypes.
- Remove sched_lock locking from kse_purge() as all callers already lock
  the sched_lock before calling it.
- Hold the proc lock slightly longer to protect P_SHOULDSTOP().

21 years agoKeep the proc locked while we set PS_INMEM so that either of the proc lock
jhb [Tue, 22 Apr 2003 19:45:26 +0000 (19:45 +0000)]
Keep the proc locked while we set PS_INMEM so that either of the proc lock
or sched_lock are sufficient to test this flag.

XXX: vinum should really be using a kernel process via kthread_create()
instead of this hack.  I'm not even sure PS_INMEM can be clear at this
point anyways.

21 years agoCollapse meta arguments into regular arguments, the distinction is
phk [Tue, 22 Apr 2003 19:42:05 +0000 (19:42 +0000)]
Collapse meta arguments into regular arguments, the distinction is
more trouble than it is worth.

21 years agoCollapse the meta arguments into normal arguments, trying to distinguish
phk [Tue, 22 Apr 2003 19:31:00 +0000 (19:31 +0000)]
Collapse the meta arguments into normal arguments, trying to distinguish
just makes our own life harder.

21 years agoUse .Pa for the pccard_ether file.
trhodes [Tue, 22 Apr 2003 18:53:14 +0000 (18:53 +0000)]
Use .Pa for the pccard_ether file.
s/spppconfig/spppcontrol/

Submitted by: "Simon L. Nielsen" <simon@nitro.dk>

21 years ago- Replace inline implementations of sigprocmask() with calls to
jhb [Tue, 22 Apr 2003 18:23:49 +0000 (18:23 +0000)]
- Replace inline implementations of sigprocmask() with calls to
  kern_sigprocmask() in the various binary compatibility emulators.
- Replace calls to sigsuspend(), sigaltstack(), sigaction(), and
  sigprocmask() that used the stackgap with calls to the corresponding
  kern_sig*() functions instead without using the stackgap.