dg [Sat, 11 Nov 2000 23:03:38 +0000 (23:03 +0000)]
Changed variable killchar to killch and erasechar to erasech to avoid
a name clash with the library functions of the same name (in libncurses).
This problem was masked when building tset shared (the local symbols had
precedence), but caused tset to core dump when it was built -static.
bmilekic [Sat, 11 Nov 2000 23:01:44 +0000 (23:01 +0000)]
Change check for existence of mbuf->m_ext.ext_free to check of new ext_type
in order to determine whether the ext_buf is a cluster, or some other type
of storage.
deischen [Sat, 11 Nov 2000 22:20:36 +0000 (22:20 +0000)]
Correct the logic for checking the emptiness of the waiting queue.
This fixes a potential problem where the file descriptors would not
be polled causing waiting threads to stay waiting. Doh!
ben [Sat, 11 Nov 2000 19:16:05 +0000 (19:16 +0000)]
* Fix inconsistency between "int" and "num"; as far as I can see they mean
the same thing in this context.
* Only include one fullstop in the SEE ALSO line.
julian [Sat, 11 Nov 2000 09:49:49 +0000 (09:49 +0000)]
Add basic PCI capability
Not sure how unit numbers are carried across between
PCI and ISA though.. maybe there should be only one devclass between the two?
rwatson [Fri, 10 Nov 2000 23:57:48 +0000 (23:57 +0000)]
o Fix a mis-transcription of sef's -STABLE protection fixes--only root
could debug processes after the commit that introduced the typo.
Security is good, but security is not always the same as turning things
off :-).
kris [Fri, 10 Nov 2000 23:27:55 +0000 (23:27 +0000)]
Increase the size of the mktemp() filename space by dropping the PID from
the encoding and using the character set [a-zA-Z0-9]. This gives a total
of 62^6 = 56800235584 possible temporary filenames for the usual default
invocation of 6 X's (compared to as few as 52 possibilities for the
previous algorithm where up to 5 characters were wasted by the PID).
Update some apparently bitrotten comments to reflect reality.
Audited by: eivind, freebsd-audit
Reviewed by: freebsd-current (a while ago)
Originally submitted by: Peter Jeremy <Peter.Jeremy@alcatel.com.au>
gallatin [Fri, 10 Nov 2000 23:04:31 +0000 (23:04 +0000)]
Enable linux thread support on the alpha. The guts of linux_clone was
mainly cut-n-pasted from the i386 port, except for the method of setting
the child's stack which is the only MD part of this function.
I've tested with the example apps shipped with the linux threads source
code (ex1-ex6) and with several binary builds of Mozilla.
gallatin [Fri, 10 Nov 2000 23:00:54 +0000 (23:00 +0000)]
Simplify and correct OSF/1 signal handling.
- No signal translation is needed. Our signals match the OSF/1 signals
- an OSF/1 sigset_t is 64 bits. Make certain to use all 64-bits of it.
We'd previously only used the lower 32 bits. This was mostly harmless
as I don't know of an OSF/1 apps which use any signals > 31. However,
the alpha Linux ABI uses the osf/1 signal routines and threaded linux
apps tyically use signals 32 and 33 to comminicate with the manager
thread, so it is important we preserve the upper 32-bits.
gibbs [Fri, 10 Nov 2000 20:13:41 +0000 (20:13 +0000)]
Sync Perforce IDs, add tranceiver state change support, and correct
numerous error recovery buglets.
Many thanks to Tor Egge for his assistance in diagnosing problems with
the error recovery code.
aic7xxx.c:
Report missed bus free events using their own sequencer interrupt
code to avoid confusion with other "bad phase" interrupts.
Remove a delay used in debugging. This delay could only be hit
in certain, very extreme, error recovery scenarios.
Handle transceiver state changes correctly. You can now
plug an SE device into a hot-plug LVD bus without hanging
the controller.
When stepping through a critical section, panic if we step
more than a reasonable number of times.
After a bus reset, disable bus reset interupts until we either
our first attempt to (re)select another device, or another device
attemps to select us. This removes the need to busy wait in
kernel for the scsi reset line to fall yet still ensures we
see any reset events that impact the state of either our initiator
or target roles. Before this change, we had the potential of
servicing a "storm" of reset interrupts if the reset line was
held for a significant amount of time.
Indicate the current sequencer address whenever we dump the
card's state.
aic7xxx.reg:
Transceiver state change register definitions.
Add the missed bussfree sequencer interrupt code.
Re-enable the scsi reset interrupt if it has been
disabled before every attempt to (re)select a device
and when we have been selected as a target.
When being (re)selected, check to see if the selection
dissappeared just after we enabled our bus free interrupt.
If the bus has gone free again, go back to the idle loop
and wait for another selection.
Note two locations where we should change our behavior
if ATN is still raised. If ATN is raised during the
presentation of a command complete or disconnect message,
we should ignore the message and expect the target to put
us in msgout phase. We don't currently do this as it
requires some code re-arrangement so that critical sections
can be properly placed around our handling of these two
events. Otherwise, we cannot guarantee that the check of
ATN is atomic relative to our acking of the message in
byte (the kernel could assert ATN).
Only set the IDENTIFY_SEEN flag after we have settled
on the SCB for this transaction. The kernel looks at
this flag before assuming that SCB_TAG is valid. This
avoids confusion during certain types of error recovery.
Add a critical section around findSCB. We cannot allow
the kernel to remove an entry from the disconnected
list while we are traversing it. Ditto for get_free_or_disc_scb.
aic7xxx_freebsd.c:
Only assume that SCB_TAG is accurate if IDENTIFY_SEEN is
set in SEQ_FLAGS.
Fix a typo that caused us to execute some code for the
non-SCB paging case when paging SCBs. This only occurred
during error recovery.
obrien [Fri, 10 Nov 2000 16:54:45 +0000 (16:54 +0000)]
Link with libgcc_pic when building shared objects.
(note we should not just use GCC's default LIBGCC_SPEC as it doesn't use
the PIC version when linking shared)
joe [Fri, 10 Nov 2000 15:21:37 +0000 (15:21 +0000)]
Define a new special type: buildopts.
This allows build flags to be specified for a particular program from
within the crunch.conf file, eg:
prog ppp
special ppp buildopts -DNOKLDLOAD -DNOINET6 -DNONAT -DNOATM
This adds '-DNOKLDLOAD -DNOINET6 -DNONAT -DNOATM' to make targets
related to ppp when determining which object files to build and
when calculating dependencies and building the targets.
bde [Fri, 10 Nov 2000 14:54:15 +0000 (14:54 +0000)]
Quick fix for not writing group descriptor group, inode bitmaps or
block bitmaps before unmount() completes. They were written using
bdwrite(), so they were normally written less than 32 seconds after
unmount(), but this is too late if the media is removed or the system
is rebooted soon after unmount(). sync()ing before unmount() didn't
help, because ext2fs uses buggy private caching for these blocks --
it doesn't even bdwrite() them until they are uncached or the filesystem
is unmounted. sync()ing after unmount() didn't help, because sync()
only applies to (vnodes for) mounted filesystems.
sheldonh [Fri, 10 Nov 2000 10:22:49 +0000 (10:22 +0000)]
Miscellaneous content fixes:
* xref sysctl
* do not mark kern.ipc.mbuf_wait up as a function argument.
* do not mix case of function argument names
* a mbuf -> an mbuf
* if -> whether
* typos
benno [Fri, 10 Nov 2000 06:29:42 +0000 (06:29 +0000)]
OpenFirmware/PowerPC loader, part 2.
This brings the loader up to the point where I can compile it under
NetBSD/macppc and have it boot, interact and talk to NFS servers.
sys/boot/ofw/libofw/main.c has been deleted (it has no revision history) and
replaced with sys/boot/ofw/common/main.c
benno [Fri, 10 Nov 2000 06:15:24 +0000 (06:15 +0000)]
Disable the end guard for now.
The test for failing the end guard was always triggering (and was reported as
such in compiler warnings). This is a temporary band-aid until I can work
out what's really going on.
alfred [Thu, 9 Nov 2000 23:34:39 +0000 (23:34 +0000)]
Manpage incorrectly states that STAILQ_REMOVE_HEAD takes an arg
called 'elm'. It doesn't take an arg 'elm', it simply removes the
element at the head of the list.
obrien [Thu, 9 Nov 2000 15:50:22 +0000 (15:50 +0000)]
Found remaining -kthread option that [sort of] supported using the
LinuxThreads port. Dike it out as it was removed from freebsd.h on
19-July-2000 as this option depended on bits not part of the base system
and required people to install the LinuxThreads port in a manner
non-consistent with the workings of our Ports Collection.
Fix i4b netgraph interface to not kernel panic at boot time
Make code compile and work for FreeBSD 4.x as well as FreeBSD 5.x
Submitted by: Michael Reifenberger <root@nihil.plaut.de>
msmith [Thu, 9 Nov 2000 10:21:23 +0000 (10:21 +0000)]
Implement a trivial but effective interface for obtaining the kernel's
device tree and resource manager contents. This is the kernel side of
the upcoming libdevinfo, which will expose this information to userspace
applications in a trivial fashion.
adrian [Thu, 9 Nov 2000 09:03:19 +0000 (09:03 +0000)]
Remove the block/char device distinction. badsect only worked on bdevs,
and then mapped /dev/foo into /dev/rfoo to get to the character device.
This isn't needed anymore.
marcel [Thu, 9 Nov 2000 08:25:48 +0000 (08:25 +0000)]
Make MINSIGSTKSZ machine dependent, and have the sigaltstack
syscall compare against a variable sv_minsigstksz in struct
sysentvec as to properly take the size of the machine- and
ABI dependent struct sigframe into account.
The SVR4 and iBCS2 modules continue to have a minsigstksz of
8192 to preserve behavior. The real values (if different) are
not known at this time. Other ABI modules use the real
values.
deischen [Thu, 9 Nov 2000 05:08:26 +0000 (05:08 +0000)]
Don't needlessly poll file descriptors when there are no
file descriptors needing to be polled (Doh!). Reported
by Dan Nelson <dnelson@emsphone.com>.
Don't install and start the scheduling timer until the
first thread is created. This prevents the overhead of
having a periodic scheduling signal in a single threaded
program. Reported by Dan Nelson <dnelson@emsphone.com>.
Allow builtin longjmps out of application installed
signal handlers without the need perform any post-handler
cleanup:
o Change signal handling to save the threads interrupted
context on the stack. The threads current context is
now always stored in the same place (in the pthread).
If and when a signal handler returns, the interrupted
context is copied back to the storage area in the pthread.
o Before calling invoking a signal handler for a thread,
back the thread out of any internal waiting queues
(mutex, CV, join, etc) to which it belongs.
Rework uthread_info.c a bit to make it easier to change
the format of a thread dump.
Use an alternal signal stack for the thread library's
signal handler. This allows us to fiddle with the main
threads stack without fear of it being in use.
dougb [Thu, 9 Nov 2000 00:19:21 +0000 (00:19 +0000)]
* Reduce diffs to RELENG_4 by specifying a full path to sysctl
* Adjust a little whitespace
* Make the distrib-dirs/mtree on DESTDIR conditional on user
actually specifying a DESTDIR. This seemed like a safe
way to get the right directories and permissions in the
installed tree since 'make installworld' does the same
thing, but in practice too many people have custom hacks
that we should leave unmolested. Still need to find a way
to deal with 'install -d' and permissions on nonexistent
directories in the middle of the path, but this is at
least no worse that it was before.
julian [Wed, 8 Nov 2000 21:54:28 +0000 (21:54 +0000)]
Having figured out a bit more of the new-bus puzzle
I have added support for finding non-PNP devices to this
sample loadable ISA driver.
PCI support will come later.
If someone with a clue about newbus were to look it over it would be
really cool.
mjacob [Wed, 8 Nov 2000 18:48:21 +0000 (18:48 +0000)]
Clean this is up a bit for multiple MIDs... We can figure out which MID
for an interrupt to enable/disable from the vector (and GID too, if we
had multiple GIDs)- so, stupidly for now, search for the right mcpcia's
softc so we have the right base address for the bridge CSR to apply
IRQ bit-twiddle's to. Alas- this doesn't yet allow us to run, but it's
the right direction.
mjacob [Wed, 8 Nov 2000 18:37:12 +0000 (18:37 +0000)]
Add special quirk for this ancient Viper drive. This is all creeping
driver bloat -I really *have* to do a quirk table that can be loaded
by the loader.
asmodai [Wed, 8 Nov 2000 16:59:25 +0000 (16:59 +0000)]
Fix CMSG and ALIGN macro usage.
Previously we had to include <machine/param.h> or <sys/param.h> bogusly
due to the fact that <sys/socket.h> CMSG macros needed the ALIGN macro,
which was defined in param.h. However, including param.h was a disaster
for namespace pollution.
This solution, as contributed by shin a while ago, fixes it elegantly
by wrapping the definitions around some namespace pollution preventer
definitions.
This patch was long overdue.
This should allow any network programmer to use <sys/socket.h> as
before.
PR: 19971, 20530
Submitted by: Martin Kaeske <MartinKaeske@lausitz.net>
Mark Andrews <Mark.Andrews@nominum.com>
Patch submitted by: shin
Reviewed by: bde