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} :)
Jason Evans [Fri, 24 Dec 1999 00:03:00 +0000 (00:03 +0000)]
Creating weak symbols doesn't work correctly when building an aout libc.
Doing the "right thing" here is difficult, so create two ENTRY points for
each function (for example, __setjmp and setjmp are equivalent). This
isn't pretty, but it works for both aout and ELF.
libc symbol naming needs an overhaul in order to properly support function
wrapping, specifically in the case of a real libpthread, and these
duplicate entry points should be fixed as part of that overhaul.
Marcel Moolenaar [Thu, 23 Dec 1999 19:58:09 +0000 (19:58 +0000)]
o Define `offsetof' when not already defined,
o Define ASSYM(sym, v) as the primary macro to use,
o Define ASSYM_SELF and ASSYM_OFFSET in terms of ASSYM,
Marcel Moolenaar [Thu, 23 Dec 1999 19:18:28 +0000 (19:18 +0000)]
Don't build caesar as a tool. fortune(6) doesn't depend on it
anymore. Update comments and variable names as well to wipe out any
traces that may confuse people in the future.
Marcel Moolenaar [Thu, 23 Dec 1999 19:09:59 +0000 (19:09 +0000)]
Use tr(1) instead of caesar(6) to perform the rotation. This removes
the dependency on caesar which therefore doesn't need to be built by
bootstrap-tools.
Suggested by: des
Previously mentioned by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Bill Paul [Thu, 23 Dec 1999 19:05:58 +0000 (19:05 +0000)]
Fix problem reported by Matt Dillon. Occasionally, very small received
frames would be handled incorrectly due to bad usage of m_pullup() in
the case where the frame wraps from the end of the receive buffer back
the beginning.
Also, when manually extending small packets to pad them to the minimum
frame length during transmission, zero out the pad area to make some
really paranoid people happy.
Bruce Evans [Thu, 23 Dec 1999 17:35:48 +0000 (17:35 +0000)]
Removed unused include of <sys/buf.h> from synopsis. This include is
needed to access the internals of buffers but not necessarily to use
the VOP. <sys/buf.h> recently grew a bogus dependency on <sys/systm.h>
for the declaration of spl*, and I prefer to fix the synopsis breakage
by removing a wart instead of adding one.
Bruce Evans [Thu, 23 Dec 1999 17:28:46 +0000 (17:28 +0000)]
Fixed bitrot in synopsis. The prototype for VOP_ISLOCKED() changed
recently, except of course in the documentation. Other parts of this
man page are several years out of date.
Bruce Evans [Thu, 23 Dec 1999 17:16:32 +0000 (17:16 +0000)]
"Fixed" assorted bitrot. remove_dev() was renamed to destroy_dev().
VOP_ABORTOP() went away. at_shutdown() was replaced by undocumented
event handling. Rename remove_dev() here too, and remove the dead
and dead wrong man pages.
Bruce Evans [Thu, 23 Dec 1999 16:29:58 +0000 (16:29 +0000)]
Fixed wrong prototype and missing include for strsignal(3). strsignal()
takes an int arg and is prototyped in <string.h>. It has the opposite
interface botches to psignal(3) which takes a bogus unsigned arg but is
prototyped in the right place.
This is not the last of the interface problems for strsignal(). We
obtained it from NetBSD, but NetBSD has moved its prototype to
<unistd.h>. strsignal() should return const char *, but it returns
char * for historical reasons. NetBSD declares it as returning
__aconst char, where __aconst is normally empty but can be set to
`const' to give better error checking. glibc-2.1.1 prototypes
strsignal() in <string.h>.
Bruce Evans [Thu, 23 Dec 1999 16:12:24 +0000 (16:12 +0000)]
Fixed missing installation of a link to getlogin_r.3. This is the first
example of section 2 and section 3 interfaces sharing a man page. It's
probably a bad example.