das [Sun, 20 Jun 2004 09:25:27 +0000 (09:25 +0000)]
Add trivial implementations of scalbln() and scalblnf().
These routines are specified in C99 for the sake of
architectures where an int isn't big enough to represent
the full range of floating-point exponents. However,
even the 128-bit long double format has an exponent smaller
than 15 bits, so for all practical purposes, scalbln() and
scalblnf() are aliases for scalbn() and scalbnf(), respectively.
bde [Sun, 20 Jun 2004 03:11:19 +0000 (03:11 +0000)]
Backed out previous commit. The dev_t -> `struct cdev *' changes have
lots of errors. Blind substitution of "dev_t foo" by "struct cdev *foo"
in comments usually just created an English syntax error (e.g.,
"struct cdev *changes"), but here it did less than that since the dev_t
is a user dev_t.
gad [Sun, 20 Jun 2004 02:03:33 +0000 (02:03 +0000)]
Add a call to calcru() to update the kproc_info fields of ki_rusage.ru_utime
and ki_rusage.ru_stime. This greatly improves the accuracy of those fields.
iedowse [Sat, 19 Jun 2004 22:41:18 +0000 (22:41 +0000)]
Print the `99.99% done, finished soon' message only as often as the
normal status messages. Previously a large number of these new
messages could be spewed out towards the end of a dump.
bde [Sat, 19 Jun 2004 22:24:16 +0000 (22:24 +0000)]
Clear any pending exceptions before using frstor (in the non-FXSR case)
in npxsetregs() too. npxsetregs() must overwrite the previous state, and
it is never paired with an npxgetregs() that would defuse the previous
state (since npxgetregs() would have fninit'ed the state, leaving nothing
to do).
PR: 68058 (this should complete the fix)
Tested by: Simon Barner <barner@in.tum.de>
smkelly [Sat, 19 Jun 2004 21:17:07 +0000 (21:17 +0000)]
Yield to ru's ninja-like manpage skills and update watchdog(4) to
look more like other manpages. Move some content around, use an EXAMPLES
section, etc.
marcel [Sat, 19 Jun 2004 21:14:10 +0000 (21:14 +0000)]
Add the necessary branding of ELF files. This is relatively easy to
achieve on ia64, because we need to generate the ELF64/ia64 code and
simply tag elf-fbsd-brand.c at the end of it.
This hasn't actually been tested beyond trivial compilation testing.
A buildworld has been started and it's time I wait for my changes to
loop back to my local repo anyway. I'll get back to this in a couple
of hours...
obrien [Sat, 19 Jun 2004 20:40:00 +0000 (20:40 +0000)]
Grrr. our rev 1.19 (FSF GCC rev 1.579) is causing some problems on 32-bit
systems. So only use the rev 1.19 (FSF GCC rev 1.579) change on 64-bit
systems.
marcel [Sat, 19 Jun 2004 20:37:38 +0000 (20:37 +0000)]
Move the elf32-target.h and elf64-target.h targets from the MD
makefiles to the centralized makefile. This not only reduces
duplication, it also makes the MD quirks stand out better and
thus improves maintenance.
imp [Sat, 19 Jun 2004 19:46:13 +0000 (19:46 +0000)]
The 3C3SH573BT looks like the Xircom RealPort cards to the naked eye,
but it appears to have a 3CxFE575BT under the hood (and is identified
as such by the xl driver). Add it to the list of supported cards. No
driver changes are required or necessary to support this card.
marcel [Sat, 19 Jun 2004 19:25:33 +0000 (19:25 +0000)]
Update to binutils 2.15:
o HAVE_SEEKO and HAVE_TELLO are defined now. These are used in bfdio.c.
o HAVE_STRTOULL is defined now. This is used in bfd.c.
marcel [Sat, 19 Jun 2004 17:58:32 +0000 (17:58 +0000)]
Define __lwpid_t as an int32_t in <sys/_types.h> and define lwpid_t
as an __lwpid_t in <sys/types.h>. Retype td_tid from an int to a
lwpid_t and change related definitions accordingly.
tjr [Sat, 19 Jun 2004 14:46:13 +0000 (14:46 +0000)]
When no fixed address is given in a shmat() request, pass a hint address
to vm_map_find() that is less likely to be outside of addressable memory
for 32-bit processes: just past the end of the largest possible heap.
This is the same hint that mmap() uses.
gad [Sat, 19 Jun 2004 14:08:10 +0000 (14:08 +0000)]
Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul. Also uses the timeradd() macro to correct
the calculation of ki_childtime. That will correct the value returned
when ki_childtime.tv_usec > 1,000,000.
This also implements a new KERN_PROC_GID option for kvm_getprocs().
It also implements the KERN_PROC_RGID and KERN_PROC_SESSION options
which were added to sys/kern/kern_proc.c revision 1.203.
PR: bin/65803 (a very tiny piece of the PR)
Submitted by: Cyrille Lefevre
gad [Sat, 19 Jun 2004 14:03:00 +0000 (14:03 +0000)]
Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul. Also uses the timevaladd() routine to
correct the calculation of ki_childtime. That will correct the value
returned when ki_childtime.tv_usec > 1,000,000.
This also implements a new KERN_PROC_GID option for kvm_getprocs().
(there will be a similar update to lib/libkvm/kvm_proc.c)
gad [Sat, 19 Jun 2004 13:49:25 +0000 (13:49 +0000)]
Add some more fields to the 'struct kinfo_proc', including some fields
which just mark areas which are empty due to issues with the alignment
of already-existing fields. This defines several unrelated variables
in one shot, because most of the work for updating kinfo_proc is making
sure the sizeof(struct kinfo_proc) remains the same across all hardware
platforms, and that no space is wasted on any platform due to alignment
issues with the new variables.
bde [Sat, 19 Jun 2004 12:28:48 +0000 (12:28 +0000)]
Removed foot-shooting setting of CR0_TS in exec_setregs(). It is
unnecessary because cpu_setregs() and/or npxinit() always sets CR0_TS
during system initialization, and CR0_TS is set in the next statement
(fpstate_drop()) if necessary after system initialization. Setting
it unnecessarily was less than a pessimization since it broke the
invariant that the npx can be used without an npxdna() trap if
fpucurthread is non-null. The broken invariant became harmful when I
added an fnclex to npxdrop().
Removed setting of CR0_MP in exec_setregs(). This was similarly
unnecessary but was harmless.
Updated comments (mainly by removing them). Things are simpler now
that we have cpu_setregs() and don't support a math emulator or pretend
to support not having either a math emulator or an npx.
Removed the ifdef for avoiding setting CR0_NE in the !SMP case in
cpu_setregs(). npx_probe() should reverse the setting if it wants to
force IRQ13 exception handling for testing.
stefanf [Sat, 19 Jun 2004 09:25:21 +0000 (09:25 +0000)]
Our MI implementation of ilogb() returns -INT_MAX for the argument 0.0 rather
than INT_MIN, so adjust FP_ILOGB0 to reflect this. Use <machine/_limits.h> for
INT_MAX's value while there.
obrien [Sat, 19 Jun 2004 07:29:04 +0000 (07:29 +0000)]
Merge FSF GCC rev 1.579 change ((x86_output_mi_thunk): Don't pass MEM to
%P0, just SYMBOL_REF) into GCC 3.3.3. This fixes the bad C++ thunks code
generation building Firefox on AMD64.
kientzle [Sat, 19 Jun 2004 04:19:27 +0000 (04:19 +0000)]
Ignore file flag bits that we don't support. In particular, this
corrects a segfault seen when archiving files from NTFS (which sets
bits in st_flags that are not documented in <sys/stat.h>.)
gad [Sat, 19 Jun 2004 03:28:42 +0000 (03:28 +0000)]
Fix the check for a "duplicate filename to compress", so that we're checking
the *filename* and not the pid_file(!). Stupid brain-fault on my part.
This could cause a segfault under -neworder if newsyslog had to rotate
multiple files, and later ones had specifed the 'N' flag.
das [Sat, 19 Jun 2004 03:25:28 +0000 (03:25 +0000)]
Memory's free, but all the world ain't a VAX anymore. Bring math.3
kicking and screaming into the 1980's. This change converts most of
the markup from man(7) to mdoc(7) format, and I believe it removes or
updates everything that was flat out wrong. However, much work is
still needed to sanitize the markup, improve coverage, and reduce
overlap with other manpages. Some of the sections would better belong
in a philosophy_of_w_kahan.3 manpage, but they are informative and
remain at least as reminders of topics to cover.
rwatson [Sat, 19 Jun 2004 03:23:14 +0000 (03:23 +0000)]
Assert socket buffer lock in sb_lock() to protect socket buffer sleep
lock state. Convert tsleep() into msleep() with socket buffer mutex
as argument. Hold socket buffer lock over sbunlock() to protect sleep
lock state.
Assert socket buffer lock in sbwait() to protect the socket buffer
wait state. Convert tsleep() into msleep() with socket buffer mutex
as argument.
Modify sofree(), sosend(), and soreceive() to acquire SOCKBUF_LOCK()
in order to call into these functions with the lock, as well as to
start protecting other socket buffer use in their implementation. Drop
the socket buffer mutexes around calls into the protocol layer, around
potentially blocking operations, for copying to/from user space, and
VM operations relating to zero-copy. Assert the socket buffer mutex
strategically after code sections or at the beginning of loops. In
some cases, modify return code to ensure locks are properly dropped.
Convert the potentially blocking allocation of storage for the remote
address in soreceive() into a non-blocking allocation; we may wish to
move the allocation earlier so that it can block prior to acquisition
of the socket buffer lock.
Drop some spl use.
NOTE: Some races exist in the current structuring of sosend() and
soreceive(). This commit only merges basic socket locking in this
code; follow-up commits will close additional races. As merged,
these changes are not sufficient to run without Giant safely.
rwatson [Fri, 18 Jun 2004 20:22:21 +0000 (20:22 +0000)]
In tcp_ctloutput(), don't hold the inpcb lock over a call to
ip_ctloutput(), as it may need to perform blocking memory allocations.
This also improves consistency with locking relative to other points
that call into ip_ctloutput().
green [Fri, 18 Jun 2004 20:12:42 +0000 (20:12 +0000)]
Add a sysctl/tunable, "kern.always_console_output", that lets you set
output to permanently (not ephemerally) go to the console. It is also
sent to any other console specified by TIOCCONS as normal.
While I'm here, document the kern.log_console_output sysctl.
pjd [Fri, 18 Jun 2004 16:38:42 +0000 (16:38 +0000)]
Check if ${_dir}/kern exists as well, because if it doesn't exists
we will fail later and we can miss good kernel source tree directory.
I found this trying to compile kld module and it finds 'conf/kmod.mk'
in '../..', but it fails later, because there is no 'kern' directory,
but there is valid kernel source tree still in /usr/src/sys/.
kuriyama [Fri, 18 Jun 2004 14:35:17 +0000 (14:35 +0000)]
Avoid deadlock which is caused by locking VDIR of parent and VREG of
snapshot itself in wrong order.
We can skip unlink check of that directory because it must have
snapshot in it.
bms [Fri, 18 Jun 2004 14:25:44 +0000 (14:25 +0000)]
Add a stub for the Linux SOUND_MIXER_INFO ioctl (even though we don't
actually implement it), as some applications, such as RealProducer,
expect to be able to use it.
bms [Fri, 18 Jun 2004 12:58:45 +0000 (12:58 +0000)]
Check that m->m_pkthdr.rcvif is not NULL before checking if a packet
was received on a broadcast address on the input path. Under certain
circumstances this could result in a panic, notably for locally-generated
packets which do not have m_pkthdr.rcvif set.
This is a similar situation to that which is solved by
src/sys/netinet/ip_icmp.c rev 1.66.
green [Fri, 18 Jun 2004 06:33:44 +0000 (06:33 +0000)]
Add to conscontrol(8) "set" and "unset" commands which modify the
virtual console set-up. Specifically, "conscontrol unset" will cause
printf(9) output to start going to the console again.
davidxu [Fri, 18 Jun 2004 06:21:09 +0000 (06:21 +0000)]
Remove a bogus panic. It is possible more than one threads will
be suspended in thread_suspend_check, after they are resumed, all
threads will call thread_single, but only one can be success,
others should retry and will exit in thread_suspend_check.