Bruce Evans [Mon, 1 Sep 1997 00:18:02 +0000 (00:18 +0000)]
Added #include of <sys/queue.h> to make this self-sufficient.
Includers of this file apparently didn't know that <sys/queue.h>
was a prerequisite and include a semi-random collection headers
until one happened to include it.
Bruce Evans [Sun, 31 Aug 1997 22:12:19 +0000 (22:12 +0000)]
Hide the declaration of `struct exception' from C++, since it conflicts
with the standard C++ `class exception'. This makes matherr() difficult
to use in C++. Small loss.
Peter Wemm [Sun, 31 Aug 1997 21:06:40 +0000 (21:06 +0000)]
Fix the ${BINFORMAT} definition problem during 'make {build}world'. The
wrong switches were being passed to 'make' that caused sys.mk to come from
the /usr/share/mk location but the bsd.*.mk files to come from the
source tree in src/share/mk. This was bound to break sooner or later.
Stefan Eßer [Sun, 31 Aug 1997 19:35:52 +0000 (19:35 +0000)]
Fix problem with early revision 53c825a and 53c875 chips, which
could cause a solid system lockup in the driver attach:
These chips do not abort an access to the internal SRAM, when
the driver set the software reset bit in the istat register. But
the chip will never acknowledge the requested PCI bus transfer
in the situation, causing an infinite wait and a lockout of other
bus-masters.
The problem has been reported for rev 0x11 of the 53c825a and
rev 0x01 of the 53c875.
Revisions 0x13 of the 53c825a and 0x03 of the 53c875 are known
to support SRAM accesses, even in the software reset state.
Change the 0xdeadb hack to a flag called VDOOMED.
Introduce VFREE which indicates that vnode is on freelist.
Rename vholdrele() to vdrop().
Create vfree() and vbusy() to add/delete vnode from freelist.
Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0)
vnodes off the freelist.
Generalize vhold()/v_holdcnt to mean "do not recycle".
Fix reassignbuf()s lack of use of vhold().
Use vhold() instead of checking v_cache_src list.
Remove vtouch(), the vnodes are always vget'ed soon enough
after for it to have any measuable effect.
Add sysctl debug.freevnodes to keep track of things.
Move cache_purge() up in getnewvnodes to avoid race.
Decrement v_usecount after VOP_INACTIVE(), put a vhold() on
it during VOP_INACTIVE()
Unmacroize vhold()/vdrop()
Print out VDOOMED and VFREE flags (XXX: should use %b)
Steve Passe [Sun, 31 Aug 1997 03:17:48 +0000 (03:17 +0000)]
Debug version of simple_lock. This will store the CPU id of the
holding CPU along with the lock. When a CPU fails to get the lock
it compares its own id to the holder id. If they are the same it
panic()s, as simple locks are binary, and this would cause a deadlock.
Controlled by smptests.h: SL_DEBUG, ON by default.
Steve Passe [Sun, 31 Aug 1997 03:17:18 +0000 (03:17 +0000)]
Created a private simple_lock to control accesses to com data structs
and hardware.
There is now another simple_lock around clock data/hardware accesses in
clock.c and microtime.s. It is my belief that this is the only area
sio/cy might stumble into during an unblocked INTerrupt. Thus I separated
the sio/cy code from the generic disable_intr()/enable_intr() routines.
Controlled by smptests.h: USE_COMLOCK, ON by default.
Peter Wemm [Sun, 31 Aug 1997 00:08:35 +0000 (00:08 +0000)]
Initial elf nlist support, mostly stolen from OpenBSD (they use standard
#defines that are compatable with ours). I made some some minor tweaks
to the leading '_' tests.
Again, this is off by default for the moment. This probably should be
split into seperate files (like some of our other libc files that could
do with some splitting).
Peter Wemm [Sat, 30 Aug 1997 23:35:00 +0000 (23:35 +0000)]
Initial support for dealing with an elf /kernel. This is a loose hybrid
of OpenBSD's elf nlist code for this, and our a.out version. The OpenBSD
version was mainly a seek/read system with a mmap of the string table,
this one simply mmap's the lot (like the a.out version).
Peter Wemm [Sat, 30 Aug 1997 23:23:18 +0000 (23:23 +0000)]
A first cut at some rules for building elf shared libs. Of particular
note, using "-Wl,-f" to generate a library objects list doesn't work
anymore since the hack to ld hasn't been incorporated into binutils-2.8.
(and the -f switch is used for something else already)
Peter Wemm [Sat, 30 Aug 1997 18:50:06 +0000 (18:50 +0000)]
Allow non-page aligned file offset mmap's, providing that the system is
allowed to choose the address, or that the MAP_FIXED address has the same
remainder when modulo PAGE_SIZE as the file offset. Apparently this is
posix1003.1b specified behavior. SVR4 and the other *BSD's allow it too.
It costs us nothing to support and means we don't get EINVAL on some mmap
code that works perfectly elsewhere.
Steve Passe [Sat, 30 Aug 1997 08:08:10 +0000 (08:08 +0000)]
Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.
Warner Losh [Fri, 29 Aug 1997 23:09:45 +0000 (23:09 +0000)]
Add -execdir which will execute the exec command in the dir of the file
in question. This change and the fts changes should be merged into 2.2-stable
as soon as they are vetted in -current. This should allow cleaning of files
in /tmp to be reneabled.
Obtained from: OpenBSD
Warner Losh [Fri, 29 Aug 1997 22:56:41 +0000 (22:56 +0000)]
Merge in the safe chdir changes from Todd Miller's mods to the OpenBSD
tree. Also merge in fix to NetBSD PR #1495. These represent 1.3-1.9 in
the OpenBSD tree. Make minor KNF changes to new code (which is in the
OpenBSD as 1.10). This avoids the symlink race problems.
These patches should go into 2.2.5 before the ship if they don't
break anything in -current.
Reviewed by: Bruce Evans
Obtained from: OpenBSD
Warner Losh [Fri, 29 Aug 1997 18:00:11 +0000 (18:00 +0000)]
Remove and odd sleep found by David Holland and posted to -security.
Reviewed by: Theo de Raadt (who put it into OpenBSD)
Submitted by: David Holland <dholland@eecs.harvard.edu>
KATO Takenori [Fri, 29 Aug 1997 09:03:40 +0000 (09:03 +0000)]
Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc"
on IBM-PC box and is "pc-98" on NEC PC-98 box. Userland program can
distinguish architecture on which the program runs.
Peter Wemm [Fri, 29 Aug 1997 06:14:05 +0000 (06:14 +0000)]
"fix" this for compiling under the sticter ELF linker.. There was a
reference to an undefined function (digit_value_in_base()) that was static
elsewhere that it was used.
Peter Wemm [Fri, 29 Aug 1997 06:11:52 +0000 (06:11 +0000)]
Merge in some of my changes with John's. I've used this to build
an ELF system. I'm not sure about some of the things here. We definately
need to go back and rationalize this.
John Polstra [Thu, 28 Aug 1997 21:50:33 +0000 (21:50 +0000)]
Add a stub version of getpublickey(), in order to eliminate an
undefined symbol referenced from libc. Without the stub, it is
impossible to execute any program using the shared library if
LD_BIND_NOW=1 is in the environment. The stub always returns
failure, but it can be overridden outside the library when necessary.
I don't know whether this is the "correct" fix, but it is intolerable
to have any undefined symbols referenced from libc.
Jonathan Lemon [Thu, 28 Aug 1997 18:23:40 +0000 (18:23 +0000)]
Make X11 support in doscmd dependent on the actual libX11.a library and
include directory, rather than X11BASE. This fixes the build for people
who only have the shared X11 distribution installed.
Requested-by: A Joseph Koshy <koshy@india.hp.com>
Jonathan Lemon [Thu, 28 Aug 1997 14:36:56 +0000 (14:36 +0000)]
Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file. The LKM was really for
development, and has probably outlived its usefulness.
Add an example file for private E-Mail aliases. A user can share
~/.mail_aliases with different mail clients (e.g. mutt, mail) and can
make ~/.mailrc readable and keep the aliases private.
Mike Smith [Thu, 28 Aug 1997 11:12:08 +0000 (11:12 +0000)]
Remove bogus timeout_func_t casts.
Remove unused headers.
Remove all but one instance of the device base name.
Prototype some local static functions.
Consistently reference the softc structure as "sc" rather than "lpt".
Use err(3). Rewrote man page in mdoc format. The user visible change is that
report of s/r and r/r conflicts is now printed in two separate lines beginning
by `yacc: '.