Daniel Eischen [Tue, 28 Dec 1999 18:08:09 +0000 (18:08 +0000)]
Don't wakeup threads when there is a process signal and no installed
handler. Thread-to-thread signals (pthread_signal) are treated differently
than process signals; a pthread_signal can wakeup a blocked thread if
a signal handler is not installed for that signal.
Boris Popov [Tue, 28 Dec 1999 15:27:39 +0000 (15:27 +0000)]
It is possible that number of sectors specified in the BPB
will exceed FAT capacity. This will lead to kernel panic while other
systems just limit number of clusters.
Tim Vanderhoek [Tue, 28 Dec 1999 14:47:00 +0000 (14:47 +0000)]
Avoid the potentially confusing term "a null pointer" and say "the NULL
pointer" instead. The potential confusion arises because the string/*.3
pages use the term "null-terminated string" (which is permissable). Moreover,
this also makes these two manpages more consistent with the other string/*.3
manpages.
Alexey Zelkin [Tue, 28 Dec 1999 12:55:58 +0000 (12:55 +0000)]
Better handling groff failures. If popen(ROFF_COMMAND) returns zero bytes
then handle it as problem. This commit fixes problem with archiving empty files.
PR: gnu/5767
Submitted by: Bill Fenner <fenner@parc.xerox.com>
Peter Wemm [Tue, 28 Dec 1999 07:30:55 +0000 (07:30 +0000)]
Fix the swap backed vn case - this was broken by my rev 1.128 to
swap_pager.c and related commits.
Essentially swap_pager.c is backed out to before the changes, but
swapdev_vp is converted into a real vnode with just VOP_STRATEGY().
It no longer abuses specfs vnops and no longer needs a dev_t and
/dev/drum (or /dev/swapdev) for the intermediate layer.
This essentially restores the vnode interface as the interface to the
bottom of the swap pager, and vm_swap.c provides a clean vnode interface.
This will need to be revisited when we swap to files (vnodes) - which
is the other reason for keeping the vnode interface between the swap pager
and the swap devices.
Tim Vanderhoek [Tue, 28 Dec 1999 05:56:33 +0000 (05:56 +0000)]
Dedocument one of the BUGS listed in the last commit. The bug (needless
calculation of line numbers) never existed and the two bugs that made me
think it existed have been fixed (see recent commits about this date to
linenum.c:r.1.3 and ch.c:r.1.8 fixing broken line-number buffering and
braindead algorithms respectively).
Tim Vanderhoek [Tue, 28 Dec 1999 05:47:24 +0000 (05:47 +0000)]
Rather than use an LRU-ordered circular list to store buffered data,
simply keep an index into the last access on the circular list and begin
searches at that point. An LRU list is inappropriate here since the
vast majority of accesses will occur in the same order that the list
is created in. The only case where an LRU is remotely useful here is when
reading from a file and the user is jumping to randomish positions and
constantly returning to some central position. Even for this case it is
such a small optimization as not to be noticed in an interactive program
such as more(1).
This change results in a _tremendously_ noticable speed-up when reading long
files through a pipe (where long = ~200k, machine = ~2.5h single-disk
worldstone).
Yoshinobu Inoue [Tue, 28 Dec 1999 05:37:39 +0000 (05:37 +0000)]
Small bug fix and improvements
(1)added error check of if_nameindex() return value at getaddrinfo().
(2)print out more detailed information when getaddrinfo() error value
is EAI_SYSTEM.(in this case system error num is kept in errno)
(1) is Discovered by: jinmei@kame.net in KAME environment.
Brian Feldman [Tue, 28 Dec 1999 05:32:54 +0000 (05:32 +0000)]
Upgrade to the pam_ssh module, version 1.1..
(From the author:)
Primarily, I have added built-in functions for manipulating the
environment, so putenv() is no longer used. XDM and its variants
should now work without modification. Note that the new code uses
the macros in <sys/queue.h>.
John Polstra [Tue, 28 Dec 1999 04:38:17 +0000 (04:38 +0000)]
Work around an assert failure in the dynamic linker's default thread
locking functions. If an application loads a shared object with
dlopen() and the shared object has an init function which requires
lazy binding, then _rtld_bind is called when the thread is already
inside the dynamic linker. This leads to a recursive acquisition
of the lock, which I was not expecting -- hence the assert failure.
This work-around makes the default locking functions handle recursive
locking. It is NOT the correct fix -- that should be implemented
at the generic locking level rather than in the default locking
functions. I will implement the correct fix in a future commit.
Since the dllockinit() interface will likely need to change, warn
about that in both the man page and the header file.
Bill Paul [Tue, 28 Dec 1999 02:01:18 +0000 (02:01 +0000)]
This commit adds device driver support for the ADMtek AN986 Pegasus
USB ethernet chip. Adapters that use this chip include the LinkSys
USB100TX. There are a few others, but I'm not certain of their
availability in the U.S. I used an ADMtek eval board for development.
Note that while the ADMtek chip is a 100Mbps device, you can't really
get 100Mbps speeds over USB. Regardless, this driver uses miibus to
allow speed and duplex mode selection as well as autonegotiation.
Building and kldloading the driver as a module is also supported.
Note that in order to make this driver work, I had to make what some
may consider an ugly hack to sys/dev/usb/usbdi.c. The usbd_transfer()
function will use tsleep() for synchronous transfers that don't complete
right away. This is a problem since there are times when we need to
do sync transfers from an interrupt context (i.e. when reading registers
from the MAC via the control endpoint), where tsleep() us a no-no.
My hack allows the driver to have the code poll for transfer completion
subject to the xfer->timeout timeout rather that calling tsleep().
This hack is controlled by a quirk entry and is only enabled for the
ADMtek device.
Now, I'm sure there are a few of you out there ready to jump on me
and suggest some other approach that doesn't involve a busy wait. The
only solution that might work is to handle the interrupts in a kernel
thread, where you may have something resembling a process context that
makes it okay to tsleep(). This is lovely, except we don't have any
mechanism like that now, and I'm not about to implement such a thing
myself since it's beyond the scope of driver development. (Translation:
I'll be damned if I know how to do it.) If FreeBSD ever aquires such
a mechanism, I'll be glad to revisit the driver to take advantage of
it. In the meantime, I settled for what I perceived to be the solution
that involved the least amount of code changes. In general, the hit
is pretty light.
Also note that my only USB test box has a UHCI controller: I haven't
I don't have a machine with an OHCI controller available.
Highlights:
- Updated usb_quirks.* to add UQ_NO_TSLEEP quirk for ADMtek part.
- Updated usbdevs and regenerated generated files
- Updated HARDWARE.TXT and RELNOTES.TXT files
- Updated sysinstall/device.c and userconfig.c
- Updated kernel configs -- device aue0 is commented out by default
- Updated /sys/conf/files
- Added new kld module directory
Warner Losh [Tue, 28 Dec 1999 01:07:16 +0000 (01:07 +0000)]
Two nits and disable isa probe due to its overly agressive claiming of
devices.
o Return ENXIO from sn_isa_probe
o Fix SN_DEBUG printf
o Use IFQ_MAXLEN rather than 8
I'll fix the isa probe when I get access to a real isa attachment
device to test against here in a few days.
Tim Vanderhoek [Mon, 27 Dec 1999 20:53:35 +0000 (20:53 +0000)]
Correctly maintain state when manipulating linked lists. This fixes a
bug that prevented the line-number buffer from working correctly. AFAIK
the bug is still present in other derivatives of more(1).
Yoshinobu Inoue [Mon, 27 Dec 1999 18:53:24 +0000 (18:53 +0000)]
Add ipsec_esp option to files which depend on crypto.
Now you can build a kernel which support IPsec message authentication
but don't support message encryption, by defining IPSEC in your kernel
config file and not defining IPSEC_ESP.
Bruce Evans [Mon, 27 Dec 1999 16:22:20 +0000 (16:22 +0000)]
Fixed some bugs (one serious one: timeouts were claimed to be executed at
spl0) and some bitrot (the not-so-new callout_init/stop/reset functions
were not mentioned; the callout_activate/deactivate/pending macros are
still not mentioned).
KATO Takenori [Mon, 27 Dec 1999 13:56:54 +0000 (13:56 +0000)]
Synced with sys/i386/isa/clock.c rev 1.148. This is a cosmetic change
because PC-98 doesn't have RTC and RTC related code is included by
`#ifndef PC98' and `#endif'.
Bruce Evans [Mon, 27 Dec 1999 12:06:11 +0000 (12:06 +0000)]
Synced with Makefile.i386. The following cleanups in Makefile.i386
rev.1.168 should have been committed concurrently:
Fixed some style bugs (always use precisely 1 space after `:' in
dependency specifications).
Removed bogus dependency of ${FULLKERNEL} on ${BEFORE_DEPEND}.
Bruce Evans [Mon, 27 Dec 1999 10:47:32 +0000 (10:47 +0000)]
This should have been committed with related changes to .c files.
Changed the type used to represent the user stack pointer from `long *'
to `register_t *'. This fixes bugs like misplacement of argc and argv
on the user stack on i386's with 64-bit longs. We still use longs to
represent "words" like argc and argv, and assume that they are on the
stack (and that there is stack). The suword() and fuword() families
should also use register_t.
Bruce Evans [Mon, 27 Dec 1999 10:42:55 +0000 (10:42 +0000)]
Changed the type used to represent the user stack pointer from `long *'
to `register_t *'. This fixes bugs like misplacement of argc and argv
on the user stack on i386's with 64-bit longs. We still use longs to
represent "words" like argc and argv, and assume that they are on the
stack (and that there is stack). The suword() and fuword() families
should also use register_t.
Bruce Evans [Mon, 27 Dec 1999 10:22:09 +0000 (10:22 +0000)]
Fixed some type mismatches. p_retval[0] in struct proc has type
register_t, so pointers to it must be passed around as `register_t *',
not as `int *'. The type mismatches were non-benign on alphas, but
the broken code is normally only configured by LINT.
Peter Wemm [Mon, 27 Dec 1999 09:20:33 +0000 (09:20 +0000)]
Connect up the bootforth glue and compile it, but don't initialize it
at runtime as it has a nasty habit of crashing on the Alpha :-(.
This is being done this way so we have a common starting point for
debugging.
Peter Wemm [Mon, 27 Dec 1999 08:45:14 +0000 (08:45 +0000)]
Tidy up some loose ends. nullfs_read/write were returning the wrong value.
Fix some ctype problems - isascii() caused a warning if fed an unsigned
char - it's always > 0 and libstand is compiled with -Wall.
Missing prototype/include in printf.c
Peter Wemm [Mon, 27 Dec 1999 07:14:58 +0000 (07:14 +0000)]
Use kldsym(2) to lookup symbol values. This avoids the kvm_mkdb juggling
and is module aware. Yes, this means that kvm_nlist(3) will find symbols
in loaded modules. The emulation of the nlist struct is pretty crude but
seems to work well enough for all the users in the tree that I found.
John Polstra [Mon, 27 Dec 1999 04:44:04 +0000 (04:44 +0000)]
Add a new function dllockinit() for registering thread locking
functions to be used by the dynamic linker. This can be called by
threads packages at start-up time. I will add the call to libc_r
soon.
Also add a default locking method that is used up until dllockinit()
is called. The default method works by blocking SIGVTALRM, SIGPROF,
and SIGALRM in critical sections. It is based on the observation
that most user-space threads packages implement thread preemption
with one of these signals (usually SIGVTALRM).
The dynamic linker has never been reentrant, but it became less
reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c".
Starting with that revision, multiple threads each doing lazy
binding could interfere with each other. The usual symptom was
that a symbol was falsely reported as undefined at start-up time.
It was rare but not unseen. This commit fixes it.
Bruce Evans [Sun, 26 Dec 1999 17:07:15 +0000 (17:07 +0000)]
Fixed stripping of aout debugging kernels.
Fixed some style bugs (always use precisely 1 space after `:' in
dependency specifications).
Removed bogus dependency of ${FULLKERNEL} on ${BEFORE_DEPEND}.
Bruce Evans [Sun, 26 Dec 1999 16:21:19 +0000 (16:21 +0000)]
Don't include <isa/isavar.h> or compile code depending on it when isa
is not configured. Including <isa/isavar.h> when it is not used is
harmful as well as bogus, since it includes "isa_if.h" which is not
generated when isa is not configured.
Bruce Evans [Sun, 26 Dec 1999 15:24:58 +0000 (15:24 +0000)]
Moved $FreeBSD$ to its usual place after the CSRG id.
Fixed some style bugs for cam (superflous umask and missing newline).
Fixed bogons for apm. The pattern "apm*" matched too many things; apm
and apmctl were both made twice by `MAKEDEV all'. Hopefully no one
depends on `MAKEDEV apm0' making apm or on `MAKEDEV apm' making apmctl.
Bruce Evans [Sun, 26 Dec 1999 13:04:52 +0000 (13:04 +0000)]
Use vfs_timestamp() instead of getnanotime() to set timestamps. This
fixee incoherency of pipe timestamps relative to file timestamps in
the usual case where getnanotime() is not used for the latter. (File
and pipe timestamps are still incoherent relative to real time unless
the vfs_timestamp_precision sysctl is set to 2 or 3).
Bruce Evans [Sun, 26 Dec 1999 12:43:47 +0000 (12:43 +0000)]
Replaced the INTRMASK and INTRUNMASK macros by "|" and "&~" operations.
Some interface botches went away, leaving the macros unused outside of
the implementation of interrupt masking, and it was silly for the
implementation to use the macros in only one place each.
KATO Takenori [Sun, 26 Dec 1999 04:22:27 +0000 (04:22 +0000)]
- Cut down amount of memory in 64MB when BIOS tells the amount of
memory >= 64MB.
- Don't perform destructive memory inspection for 15 - 16MB system
area.
Tim Vanderhoek [Sun, 26 Dec 1999 04:17:27 +0000 (04:17 +0000)]
For some reason the HOME key wasn't documented. Document it. Expand
the docs on a couple other keys. While I'm here, document another ~3 bugs
that have been around for all eternity in the hope that I'll someday bother
to fix them.
Bruce Evans [Sat, 25 Dec 1999 15:30:31 +0000 (15:30 +0000)]
Fixed races accessing the RTC. The races apparently caused
apm_default_resume() to sometimes set a very wrong time.
(1) Accesses to the RTC index and data registers were not atomic enough.
Interrupts were not masked. This was only good enough until an
interrupt handler (rtcintr()) started accessing the RTC in FreeBSD-2.0.
(2) Access to the block of time registers in inittodr() was not atomic
enough. inittodr() has 244us to read the time registers. Interrupts
were not masked. This was only good enough until something (apm)
started calling inittodr() after boot time in FreeBSD-2.0.
The fix for (2) also makes the timecounter update more atomic, although
this is currently unimportant due to the low resolution of the RTC.
Sacrifice, for now, NFS and NETGRAPH on the alpha boot floppy
so that we can get it back onto 1.44MB boot media again. This
does not affect the i386 class build.
Doug Rabson [Fri, 24 Dec 1999 16:21:15 +0000 (16:21 +0000)]
* Set the devclass of a device before calling the probe method. This allows
device_printf() etc. to print something intelligible.
* Allow device_set_devclass(dev, 0) for clearing the devclass.
Bruce Evans [Fri, 24 Dec 1999 15:33:36 +0000 (15:33 +0000)]
Fixed a cast of a pointer to an integer of a possibly different size.
Fixed casts of non-`void *' pointers to uintptr_t. Fixed related
style bugs. This file uses perfectly non-KNF formatting for casts.
Brian Feldman [Fri, 24 Dec 1999 15:18:19 +0000 (15:18 +0000)]
Since we build and install gasp(1) in /usr/libexec/${OBJFORMAT}/,
and it is a user-run utility, it should be in objformat, so gasp
is in the ${PATH} :)