Commit Graph

99015 Commits

Author SHA1 Message Date
rwatson
95d7d14f32 A variety of further cleanups to ttyinfo():
- Rename temporary variable names ("tmp", "tmp2") to more informative
  names ("load", "pctcpu", "rss", ...)

- Unclutter indentation and return paths: rather than lots of nested
  ifs, simply return earlier if it's not going to work out.  Simplify
  general structure and avoid "deep" code.

- Comment on the thread/process selection and locking.

- Correct handling of "running"/"runnable" states, avoid "unknown"
  that people were seeing for running processes.  This was due to
  a misunderstanding of the more complex state machine / inhibitors
  behavior of KSE.

- Do perform ttyinfo() printing on KSE (P_SA) processes, it seems
  generally to work.

While I initially attempted to formulate this as two commits (one
layout, the other content), I concluded that the layout changes were
really structural changes.

Many elements submitted by:  bde
2004-02-04 05:46:05 +00:00
davidxu
3120af18e7 Import initial work of libpthread debugging. This is a debugger independent
friend library for libpthread, the library will be used by debugger to
read/write libpthread's internal data structures.
2004-02-04 05:01:15 +00:00
grehan
ebeb31dd3a - removed debug printf that was a false positive on non-OpenPIC systems
- white space nits
2004-02-04 04:53:09 +00:00
wpaul
a994460922 Correct/improve the implementation of NdisMAllocateSharedMemoryAsync().
Since we have a worker thread now, we can actually do the allocation
asynchronously in that thread's context. Also, we need to return a
status value: if we're unable to queue up the async allocation, we
return NDIS_STATUS_FAILURE, otherwise we return NDIS_STATUS_PENDING
to indicate the allocation has been queued and will occur later.

This replaces the kludge where we just invoked the callback routine
right away in the current context.
2004-02-04 04:44:16 +00:00
brooks
cbc3a28926 Add ifconfig support for network interface renaming. In the process,
reorganize the printing of the interface name when using wildcard
cloning so it is not printed if it we either immediately rename or
destroy the interface.

Reviewed by:	ru
2004-02-04 02:55:46 +00:00
brooks
50498cf386 Add the kernel side of network interface renaming support.
The basic process is to send a routing socket announcement that the
interface has departed, change if_xname, update the sockaddr_dl
associated with the interface, and announce the arrival of the interface
on the routing socket.

As part of this change, ifunit() is greatly simplified by testing
if_xname directly.  if_clone_destroy() now uses if_dname to look up the
cloner for the interface and if_dunit to identify the unit number.

Reviewed by:	ru, sam (concept)
		Vincent Jardin <vjardin AT free.fr>
		Max Laier <max AT love2party.net>
2004-02-04 02:54:25 +00:00
grehan
39bebd3237 PowerPC ttys file. 2004-02-04 01:44:34 +00:00
josef
678bc3382a Add myself.
Approved by:	simon(mentor)
2004-02-03 23:26:36 +00:00
deischen
9a3156bc89 Remove the band-aid (#include <time.h>). 2004-02-03 22:30:01 +00:00
deischen
afdbe3a4f3 The sem_timedwait() and ksem_timedwait() functions both
need struct timespec, so define it here.

Discussed in:	standards (wollman)
2004-02-03 22:27:03 +00:00
jhb
1c581ab59b - Use a stock loader with forth support on the boot floppies.
- Use the regular forth scripts including the stock device.hints file on
  the boot floppies.
- gzip all the various text files on the boot floppy that are larger than
  one sector to save on space.
- Generate a loader.conf to load the kernel, acpi.ko, and mfsroot making
  use of the 'module_before' variables to prompt for a floppy to be entered
  when required and use a stock loader.rc.  This enables the beastie menu
  on i386.
- PC98 has been changed to split the mfsroot for now so that the floppies
  fit.  When the PC98 bootstrap is updated to work with ELF files (which
  needs to happen anyway), then SPLIT_MFSROOT can be turned off for PC98.
2004-02-03 22:05:55 +00:00
jhb
7d3ad95e31 Revert the skipping of segment register reloads as it appears to actually
be a pessimization on non Pentium4 CPUs.  More importantly, it is buggy as
it can cause GPF's when using APM or vm86.
2004-02-03 22:00:42 +00:00
des
e23ab15538 Remove RELENG_4, leaving only security branches. 2004-02-03 19:23:12 +00:00
des
009f80e2fb Add a "stable" config for 4-STABLE. 2004-02-03 19:22:48 +00:00
des
72a56367b7 Allow multiple configs to be specified to a single tbmaster instance. 2004-02-03 19:19:29 +00:00
fjoe
d8793a0c3c Fix "warning: value computed is not used".
Found by:	gcc 2.95.4 [FreeBSD]
2004-02-03 18:53:40 +00:00
ume
d7304f4df4 pass pcb rather than so. it is expected that per socket policy
works again.
2004-02-03 18:20:55 +00:00
deischen
170c60ccae Add <time.h> -- bandaid to unbreak world in <semaphore.h>. 2004-02-03 15:55:30 +00:00
jhb
55eda735c5 Remove a bogus assertion.
Noticed by:	bde
Pointy hat to:	jhb
2004-02-03 15:14:27 +00:00
des
3b21d9168f Document NO_VINUM, which is already listed in the man page. 2004-02-03 13:57:56 +00:00
mtm
29b6073150 o Unbreak the individual jail starting patch that I broke when
I committed it. Apologies to Juergen Unger <j.unger@addict.de>.
o When stopping jails output the hostname of the jails that
  were stopped.
o Refactor
o Remove extraneous empty line
o Correct spelling error
2004-02-03 12:59:30 +00:00
le
99b1644418 Add my birthday.
Approved by: joerg (mentor)
2004-02-03 12:08:18 +00:00
des
3deac2db17 Whitespace nit. 2004-02-03 11:27:34 +00:00
des
92ccb54121 Add support for initializing swap devices with random one-shot keys. Note
that the keys are currently generated by computing the MD5 checksum of 512
bytes read from /dev/random, and are passed to gbde on the command line.

Sponsored by:	Teleplan AS
2004-02-03 11:26:08 +00:00
des
422e174e05 Mechanical whitespace cleanup. Also, note that previous commit was
Sponsored by:	Teleplan AS
2004-02-03 11:12:29 +00:00
des
d446770a7b Remove newline characters from error strings. 2004-02-03 11:10:34 +00:00
des
fb9d5ca1d2 Missed one in previous commit. 2004-02-03 10:22:55 +00:00
des
f21ace6524 Style fixes. 2004-02-03 10:21:35 +00:00
deischen
207031a72e Add prototype for sem_timedwait().
Reviewed by:	standards (Stefan Farfeleder)
2004-02-03 10:15:16 +00:00
ru
1ca86049b2 A shorter version of keeping all -std= options out of CXXFLAGS. 2004-02-03 09:40:11 +00:00
ru
fb4f842144 Fixed MINUSLPAM:
- Added missing NOCRYPT and NO_OPENSSL checks for Kerberos.

- Don't depend on -lcrypto and -lcrypt in pam_ssh to resolve
  dependencies in pam_krb5 and pam_ksu -- the former may not
  be compiled at all if NO_OPENSSH knob is enabled.

- Added missing -lcrypt to pam_ssh dependencies.

- Moved librpcsvc after libypclnt.

(The last two aren't strictly speaking necessary to resolve
the dependencies of static versions of pam_ssh and pam_unix,
respectively, but they correspond to dynamic dependencies
of libssh and libypclnt, and are put here for consistency.)

In collaboration with: bde
Reviewed by:	des
2004-02-03 09:37:12 +00:00
ru
8bcc744cd0 Take signal.c out of sources.
Reviewed by:	nectar
2004-02-03 09:32:11 +00:00
ru
f8195a3bc2 Put generated headers into SRCS so that we pick them up even if
"make depend" was not run.
2004-02-03 09:21:37 +00:00
grehan
39c59e5427 Use device alias "mpic" to locate the macio OpenPIC. This works
on the new 12/15/17" PowerBooks that don't have the "interrupt-controller"
property underneath "/chosen", which was the previous way of
searching.
2004-02-03 08:00:37 +00:00
wpaul
3a7a8fb376 Implement support for single packet sends. The Intel Centrino driver
that Asus provides on its CDs has both a MiniportSend() routine
and a MiniportSendPackets() function. The Microsoft NDIS docs say
that if a driver has both, only the MiniportSendPackets() routine
will be used. Although I think I implemented the support correctly,
calling the MiniportSend() routine seems to result in no packets going
out on the air, even though no error status is returned. The
MiniportSendPackets() function does work though, so at least in
this case it doesn't matter.

In if_ndis.c:ndis_getstate_80211(), if ndis_get_assoc() returns
an error, don't bother trying to obtain any other state since the
calls may fail, or worse cause the underlying driver to crash.

(The above two changes make the Asus-supplied Centrino work.)

Also, when calling the OID_802_11_CONFIGURATION OID, remember
to initialize the structure lengths correctly.

In subr_ndis.c:ndis_open_file(), set the current working directory
to rootvnode if we're in a thread that doesn't have a current
working directory set.
2004-02-03 07:39:23 +00:00
mtm
d8192a239a Configure a jail sysctl value only if it is different than
what the rc.conf(5) knob specifies. Also, correct a minor
capitalization error.
2004-02-03 07:15:32 +00:00
bde
ba2ea539ee Removed bogus checks that (PCPU_GET(curpcb) != NULL). Rev.1.586 of
machdep.c fixed the missing early initialization of curpcb, so curpcb
is now always set together with curthread and it cannot be NULL except
before the IDT has been set up (so trap() is unreachable) or after a
memory error.  In any case, it was often used without checking.

curcpb shouldn't exist anyway.  It doesn't exist for most non-i386 arches.
It just caches curthread->td_pcb in a global.  This was a better idea
before it was per-cpu.  trap() and some other places can get at it more
efficiently using td->td_pcb instead of PCPU_GET(curpcb).  The main
exception is support.s which mostly wants only curpcb->pcb_onfault.
2004-02-03 06:35:29 +00:00
deischen
eb99c3fe54 Provide a userland version of non-pshared semaphores and add cancellation
points to sem_wait() and sem_timedwait().  Also make sem_post signal-safe.
2004-02-03 05:50:07 +00:00
deischen
5228a2461c Modify the implementation of libc semaphores so that they can be
overridden by the threads library to provide a userland version
of non-pshared semaphores and cancellation points.  Also add
a sem_timedwait().

The libc version of semaphores always uses kernel semaphores
regardless of whether pshared is set or not.  When threads are
not present, it is difficult to get sem_wait() or sem_timedwait()
to do the right thing (since pthread_cond_timedwait() and
pthread_cond_wait() are stubs in libc and just return immediately).
2004-02-03 05:47:19 +00:00
deischen
20c2c53c53 Regen. 2004-02-03 05:20:28 +00:00
deischen
553f03bb22 Sync with kern/syscalls.master. 2004-02-03 05:18:48 +00:00
deischen
35142b05af Regen after adding ksem_timedwait(). 2004-02-03 05:11:31 +00:00
deischen
1c435d9c21 Add ksem_timedwait() to complement ksem_wait().
Glanced at by:	alfred
2004-02-03 05:08:32 +00:00
rwatson
baad160992 Don't dec/inc the amountpipes counter every time we resize a pipe --
instead, just dec/inc in the ctor/dtor.  For now, increment/decrement
in two's, since we're now performing the operation once per pair,
not once per pipe.  Not really any measurable performance change
in my micro-benchmarks, but doing less work is good, especially when
it comes to atomic operations.

Suggested by:	alc
2004-02-03 04:55:24 +00:00
njl
18d94b8db0 Notify the user (at kern.emerg) that the system will be shutting down if
it is still above the critical temperature on the next poll cycle.  This
is a 10 second advance notice by default.  Document the private
(non-standard) notify we will be using with devd(8).
2004-02-03 04:18:56 +00:00
nectar
64a45034e6 Correct a typo and unbreak the build.
Pointy hat to:	pjd
2004-02-03 04:03:19 +00:00
rwatson
bbfa440448 Catch instances of (pipe == NULL) that were obsoleted with recent
changes to jointly allocated pipe pairs.  Replace these checks
with pipe_present checks.  This avoids a NULL pointer dereference
when a pipe is half-closed.

Submitted by:	Peter Edwards <peter.edwards@openet-telecom.com>
2004-02-03 02:50:51 +00:00
trhodes
8a84b46689 Add a note about the default media types and a simple reminder to keep
individules from asking a question which may result in the following answer:

"Hi, please do not run a newfs utility on a file system if there
is still data on it you would like to keep."

PR:		56894
Submitted by:	Marc Silver <marcs@draenor.org> (original version)
2004-02-03 02:44:47 +00:00
jhb
e2a565f19f Drop the reference count on the old vmspace after fully switching the
current thread to the new vmspace.

Suggested by:	dillon
2004-02-02 23:23:48 +00:00
jhb
1767e190ac Set PCPU_GET(curpcb) for the BSP to thread0's pcb. Otherwise, the boot CPU
doesn't have a pcb until after it's first context switch.  This can cause
secondary panics if a page fault happens during bootup.
2004-02-02 23:22:24 +00:00