]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoRemove obsolete prototype of kdb_trap().
marcel [Sat, 10 Jul 2004 23:05:38 +0000 (23:05 +0000)]
Remove obsolete prototype of kdb_trap().

20 years agoMFi386: Update for the KDB framework:
marcel [Sat, 10 Jul 2004 23:04:42 +0000 (23:04 +0000)]
MFi386: Update for the KDB framework:
o  Implement makectx().
o  Call kdb_enter() instead of Debugger().
o  Remove implementation of Debugger().

20 years agoBuild uart_dbg.c for remote GDB support.
marcel [Sat, 10 Jul 2004 23:01:35 +0000 (23:01 +0000)]
Build uart_dbg.c for remote GDB support.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 22:59:30 +0000 (22:59 +0000)]
Update for the KDB framework:
o  ksym_start and ksym_end changed type to vm_offset_t.
o  Make debugging support conditional upon KDB instead of DDB.
o  Call kdb_enter() instead of breakpoint().
o  Remove implementation of Debugger().
o  Call kdb_trap() according to the new world order.

unwinder:
o  s/db_active/kdb_active/g
o  Various s/ddb/kdb/g
o  Add support for unwinding from the PCB as well as the trapframe.
   Abuse a spare field in the special register set to flag whether
   the PCB was actually constructed from a trapframe so that we can
   make the necessary adjustments.

md_var.h:
o   Add RSE convenience macros.
o   Add ia64_bsp_adjust() to add or subtract from BSP while taking
    NaT collections into account.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 22:47:06 +0000 (22:47 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Declare ksym_start and ksym_end as extern and initialize them.
   This was previously and bogusly handled by DDB itself.
o  Call kdb_enter() instead of Debugger().
o  Remove implementation of Debugger().

20 years agoMFi386: don't fake the time counter when the debugger is active.
marcel [Sat, 10 Jul 2004 22:42:22 +0000 (22:42 +0000)]
MFi386: don't fake the time counter when the debugger is active.
This breaks the fundamental property of DELAY(). Instead, avoid
grabbing clock_lock when kdb_active is non-zero.

20 years agoRemove obsolete prototype of kdb_trap().
marcel [Sat, 10 Jul 2004 22:39:56 +0000 (22:39 +0000)]
Remove obsolete prototype of kdb_trap().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 22:39:17 +0000 (22:39 +0000)]
Update for the KDB framework:
o  Make debugging support conditional upon KDB instead of DDB.
o  Remove implementation of Debugger().
o  Don't make setjump() and longjump() conditional upon DDB.
o  s/ddb_on_nmi/kdb_on_nmi/g
o  Call kdb_reenter() when kdb_active is non-zero. Call kdb_trap()
   otherwise.

20 years agoUpdate fr the KDB framework:
marcel [Sat, 10 Jul 2004 22:35:05 +0000 (22:35 +0000)]
Update fr the KDB framework:
o  Make debugging support conditional upon KDB instead of DDB.
o  Call kdb_trap() according to the new world order.
o  Kill the NO_SIO option completely.
o  Respect the boot_gdb environment variable.
o  Don't make debug specific kernel options conditional.
o  Remove implementation of Debugger().

20 years agoUpdate for the KDB framework. Sanitize the alpha console code now that
marcel [Sat, 10 Jul 2004 22:29:41 +0000 (22:29 +0000)]
Update for the KDB framework. Sanitize the alpha console code now that
it's in the way even more. Basicly: remove all alpha specific console
support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console
initialization to be identical to all other platforms. In a nutshell:
call cninit().
The platform specific code now only sets or clears RB_SERIAL and thus
automaticly causes the right console to be selected.

sio.c:
o  Replace the remote GDB hacks and use the GDB debug port interface
   instead.
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().
o  Call kdb_enter() instead of breakpoint().
o  Remove the ugly compatibility of using the console as the debug
   port.

20 years agoCall getit() unconditionally and only grab clock_lock when the
marcel [Sat, 10 Jul 2004 22:16:18 +0000 (22:16 +0000)]
Call getit() unconditionally and only grab clock_lock when the
debugger is not active. The fixes breakages of DELAY() when
running in the debugger, because not calling getit() when the
debugger is active yields a DELAY that doesn't.

20 years agoIncrease the scope of the page queues lock in vm_page_alloc() to cover
alc [Sat, 10 Jul 2004 22:12:49 +0000 (22:12 +0000)]
Increase the scope of the page queues lock in vm_page_alloc() to cover
a diagnostic check that accesses the cache queue count.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 22:11:14 +0000 (22:11 +0000)]
Update for the KDB framework:
o  s/ddb_on_nmi/kdb_on_nmi/g
o  Rename sysctl machdep.ddb_on_nmi to machdep.kdb_on_nmi
o  Make debugging support conditional upon KDB instead of DDB.
o  Call kdb_reenter() when kdb_active is non-zero.
o  Call kdb_trap() to enter the debugger when not already active.
o  Update comments accordingly.
o  Remove misplaced prototype of kdb_trap().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:49:15 +0000 (21:49 +0000)]
Update for the KDB framework:
o  Remove prototype of Debugger().
o  Remove prototype of backtrace().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:47:53 +0000 (21:47 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:45:58 +0000 (21:45 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().
o  Change comments accordingly.

20 years agoWhen the MT_SONAME mbuf is popped off of a receive socket buffer
rwatson [Sat, 10 Jul 2004 21:43:35 +0000 (21:43 +0000)]
When the MT_SONAME mbuf is popped off of a receive socket buffer
associated with a PR_ADDR protocol, make sure to update the m_nextpkt
pointer of the new head mbuf on the chain to point to the next record.
Otherwise, when we release the socket buffer mutex, the socket buffer
mbuf chain may be in an inconsistent state.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:43:23 +0000 (21:43 +0000)]
Update for the KDB framework:
o  Check kdb_active instead of db_active and do so unconditionally.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:42:16 +0000 (21:42 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  s/WITNESS_DDB/WITNESS_KDB/g
o  s/witness_ddb/witness_kdb/g
o  Rename the debug.witness_ddb sysctl to debug.witness_kdb.
o  Call kdb_backtrace() instead of backtrace().
o  Call kdb_enter() instead Debugger().
o  Assert kdb_active instead of db_active.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:38:22 +0000 (21:38 +0000)]
Update for the KDB framework:
o  Call kdb_backtrace() instead of backtrace().

20 years agoMake the GDB dynamic linker hooks (r_debug_state) conditional upon
marcel [Sat, 10 Jul 2004 21:37:30 +0000 (21:37 +0000)]
Make the GDB dynamic linker hooks (r_debug_state) conditional upon
GDB instead of DDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:36:01 +0000 (21:36 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_enter() instead of Debugger().
o  Call kdb_backtrace() instead of db_print_backtrace() or backtrace().

kern_mutex.c:
o  Replace checks for db_active with checks for kdb_active and make
   them unconditional.

kern_shutdown.c:
o  s/DDB_UNATTENDED/KDB_UNATTENDED/g
o  s/DDB_TRACE/KDB_TRACE/g
o  Save the TID of the thread doing the kernel dump so the debugger
   knows which thread to select as the current when debugging the
   kernel core file.
o  Clear kdb_active instead of db_active and do so unconditionally.
o  Remove backtrace() implementation.

kern_synch.c:
o  Call kdb_reenter() instead of db_error().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:24:36 +0000 (21:24 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_enter() instead of Debugger().
o  Remove local (static) variable in_debugger. Use kdb_active instead.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:21:55 +0000 (21:21 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:21:13 +0000 (21:21 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:20:11 +0000 (21:20 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().
o  Make debugging code conditional upon KDB instead of DDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:18:33 +0000 (21:18 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() insteadof db_alt_break().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:16:01 +0000 (21:16 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of breakpoint().
o  Call kdb_alt_break() instead of db_alt_break().
o  Make debugging code conditional upon KDB instead of DDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:14:20 +0000 (21:14 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.

20 years agoRemove DDB. The one user of this macro has been changed to use BVDDB.
marcel [Sat, 10 Jul 2004 21:13:28 +0000 (21:13 +0000)]
Remove DDB. The one user of this macro has been changed to use BVDDB.
Yes, DDB is unrelated to the debugger with the same acronym. Hence,
the change.

20 years agos/DDB/BVDDB/g
marcel [Sat, 10 Jul 2004 21:12:27 +0000 (21:12 +0000)]
s/DDB/BVDDB/g

Note that DDB is unrelated to the debugger with the same acronym.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:09:47 +0000 (21:09 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:07:44 +0000 (21:07 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().
o  Call kdb_enter() instead of breakpoint().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:06:08 +0000 (21:06 +0000)]
Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:05:14 +0000 (21:05 +0000)]
Update for the KDB framework:
o  Make debugging code dependent upon KDB instead of DDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:03:52 +0000 (21:03 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().
o  Don't make such calls conditional upon KDB instead of DDB because
   they're already conditional upon EN_DEBUG.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 21:02:17 +0000 (21:02 +0000)]
Update for the KDB framework:
o  Use kdb_alt_break() to handle the alternate break sequence instead
   of handcoding it here.
o  Remove GDB kluges to make this driver work with the pre-KDB remote
   GDB code.
o  Call kdb_enter() instead of Debugger().

Note that with this commit the dcons(4) driver cannot be used for
remote debugging anymore. This driver has to use the new GDB debug
port interface instead. Such has not been done yet.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 20:57:43 +0000 (20:57 +0000)]
Update for the KDB framework:
o  Remove inclusion of opt_ddb.h
o  Make debugging code conditional upon KDB.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 20:56:43 +0000 (20:56 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 20:55:15 +0000 (20:55 +0000)]
Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().

While here, remove a redundant return.

20 years agoUpdate for the KDB framework:
marcel [Sat, 10 Jul 2004 20:50:19 +0000 (20:50 +0000)]
Update for the KDB framework:
o  Remove inclusion of opt_ddb.h.
o  Call kdb_enter() instead of Debugger().
o  Make debugging code conditional upon KDB.

20 years agoUpdate for the KDB debugger framework:
marcel [Sat, 10 Jul 2004 20:45:47 +0000 (20:45 +0000)]
Update for the KDB debugger framework:
o  Make debugging code conditional upon KDB.
o  Use kdb_backtrace() instead of backtrace().
o  Remove inclusion of opt_ddb.h.

20 years agoHook the KDB frontend into the build.
marcel [Sat, 10 Jul 2004 20:35:00 +0000 (20:35 +0000)]
Hook the KDB frontend into the build.

20 years agoImplement makectx(). The makectx() function is used by KDB to create
marcel [Sat, 10 Jul 2004 19:56:00 +0000 (19:56 +0000)]
Implement makectx(). The makectx() function is used by KDB to create
a PCB from a trapframe for purposes of unwinding the stack. The PCB
is used as the thread context and all but the thread that entered the
debugger has a valid PCB.
This function can also be used to create a context for the threads
running on the CPUs that have been stopped when the debugger got
entered. This however is not done at the time of this commit.

20 years agoAdd new options for the KDB framework. This commit merely adds them and
marcel [Sat, 10 Jul 2004 19:34:06 +0000 (19:34 +0000)]
Add new options for the KDB framework. This commit merely adds them and
in particular not without removing the options they replace or in the
proper location in this file. The purpose of this commit is to make it
possible to commit changes in parts without causing massive build
breakages. At least, that's the intend. I have no idea if it actually
works out as I hope...

20 years agoIntroduce the KDB debugger frontend. The frontend provides a framework
marcel [Sat, 10 Jul 2004 18:40:12 +0000 (18:40 +0000)]
Introduce the KDB debugger frontend. The frontend provides a framework
in which multiple (presumably different) debugger backends can be
configured and which provides basic services to those backends.
Besides providing services to backends, it also serves as the single
point of contact for any and all code that wants to make use of the
debugger functions, such as entering the debugger or handling of the
alternate break sequence. For this purpose, the frontend has been
made non-optional.
All debugger requests are forwarded or handed over to the current
backend, if applicable. Selection of the current backend is done by
the debug.kdb.current sysctl. A list of configured backends can be
obtained with the debug.kdb.available sysctl. One can enter the
debugger by writing to the debug.kdb.enter sysctl.

20 years agoCorrect a brain-o in extract_dir: mkdirpath() and mkdir(2) are
kientzle [Sat, 10 Jul 2004 18:10:20 +0000 (18:10 +0000)]
Correct a brain-o in extract_dir:  mkdirpath() and mkdir(2) are
not interchangable.

20 years agoAdd support for uart(4) being a debug port for the GDB backend.
marcel [Sat, 10 Jul 2004 18:08:38 +0000 (18:08 +0000)]
Add support for uart(4) being a debug port for the GDB backend.

20 years agoo Document net.inet.sack.enable sysctl. net.inet.sack.sackhole_limit
maxim [Sat, 10 Jul 2004 17:55:13 +0000 (17:55 +0000)]
o Document net.inet.sack.enable sysctl.  net.inet.sack.sackhole_limit
is not documented yet, it is not used at the moment and is the subject
of the future work.

Improved by: ru
Not objected: ps, jayanth

20 years agoIntroduce the GDB debugger backend for the new KDB framework. The
marcel [Sat, 10 Jul 2004 17:47:22 +0000 (17:47 +0000)]
Introduce the GDB debugger backend for the new KDB framework. The
backend improves over the old GDB support in the following ways:
o  Unified implementation with minimal MD code.
o  A simple interface for devices to register themselves as debug
   ports, ala consoles.
o  Compression by using run-length encoding.
o  Implements GDB threading support.

20 years agoUnbreak alpha: On alpha a long double is the same as a double and
marcel [Sat, 10 Jul 2004 15:52:26 +0000 (15:52 +0000)]
Unbreak alpha: On alpha a long double is the same as a double and
consequently the exponent is only 11 bits. Testing whether the
exponent equals 32767 in that case only effects to compiler warnings
and thus build breakage.

20 years agoClean up and wash struct iovec and struct uio handling.
phk [Sat, 10 Jul 2004 15:42:16 +0000 (15:42 +0000)]
Clean up and wash struct iovec and struct uio handling.

Add copyiniov() which copies a struct iovec array in from userland into
a malloc'ed struct iovec.  Caller frees.

Change uiofromiov() to malloc the uio (caller frees) and name it
copyinuio() which is more appropriate.

Add cloneuio() which returns a malloc'ed copy.  Caller frees.

Use them throughout.

20 years agoRemove a pointless check.
phk [Sat, 10 Jul 2004 15:38:27 +0000 (15:38 +0000)]
Remove a pointless check.

20 years agoAdd a reference to od(1).
tjr [Sat, 10 Jul 2004 13:11:00 +0000 (13:11 +0000)]
Add a reference to od(1).

20 years agoDecode the "wence" arg to lseek and linux_lseek.
alfred [Sat, 10 Jul 2004 09:23:53 +0000 (09:23 +0000)]
Decode the "wence" arg to lseek and linux_lseek.

20 years agoInitialize cs_invert to "false" in new csets.
tjr [Sat, 10 Jul 2004 06:28:18 +0000 (06:28 +0000)]
Initialize cs_invert to "false" in new csets.

20 years agoNow socket buffer locks are being asserted at higher code blocks in
rwatson [Sat, 10 Jul 2004 04:38:06 +0000 (04:38 +0000)]
Now socket buffer locks are being asserted at higher code blocks in
soreceive(), remove some leaf assertions that are redundant.

20 years agoAssert socket buffer lock at strategic points between sections of code
rwatson [Sat, 10 Jul 2004 03:47:15 +0000 (03:47 +0000)]
Assert socket buffer lock at strategic points between sections of code
in soreceive() to confirm we've moved from block to block properly
maintaining locking invariants.

20 years agoModernize description of physio. Make explicit that this creates a
imp [Sat, 10 Jul 2004 01:10:17 +0000 (01:10 +0000)]
Modernize description of physio.  Make explicit that this creates a
request that's passed to the driver's strategy.

20 years ago- Add missing <sys/module.h>. [1]
marius [Fri, 9 Jul 2004 23:12:22 +0000 (23:12 +0000)]
- Add missing <sys/module.h>. [1]
- Remove unused includes.
- Sort includes.

Reported by: Pyun YongHyeon <yongari@kt-is.co.kr> [1]

20 years agodocument vfs_suser.
alfred [Fri, 9 Jul 2004 22:33:43 +0000 (22:33 +0000)]
document vfs_suser.

20 years agoForce commit.
emax [Fri, 9 Jul 2004 21:51:14 +0000 (21:51 +0000)]
Force commit.

Bluetooth code was maked as non-i386 specific.
Bump __FreeBSD_version to mark this change.

Reviewed by: kris, ru
Requested by: obrien

20 years agoCheck the lock lists to see if they are empty directly rather than
jhb [Fri, 9 Jul 2004 17:46:27 +0000 (17:46 +0000)]
Check the lock lists to see if they are empty directly rather than
assigning a pointer to the list and then dereferencing the pointer as a
second step.  When the first spin lock is acquired, curthread is not in
a critical section so it may be preempted and would end up using another
CPUs lock list instead of its own.

When this code was in witness_lock() this sequence was safe as curthread
was in a critical section already since witness_lock() is called after the
lock is acquired.

Tested by: Daniel Lang dl at leo.org

20 years agoBump __FreeBSD_version
emax [Fri, 9 Jul 2004 16:57:24 +0000 (16:57 +0000)]
Bump __FreeBSD_version

Reviewed by: kris, ru

20 years agoDo not bzero() the softc, as newbus does it for us.
cognet [Fri, 9 Jul 2004 16:56:46 +0000 (16:56 +0000)]
Do not bzero() the softc, as newbus does it for us.

20 years agoAdd fast paths for conversion of plain ASCII characters.
tjr [Fri, 9 Jul 2004 15:46:06 +0000 (15:46 +0000)]
Add fast paths for conversion of plain ASCII characters.

20 years agoSlightly reorganize and simplify.
tjr [Fri, 9 Jul 2004 15:12:10 +0000 (15:12 +0000)]
Slightly reorganize and simplify.

20 years agoDecrease default stripe size to 4k, as we have "FAST" mode turned on by
pjd [Fri, 9 Jul 2004 14:41:51 +0000 (14:41 +0000)]
Decrease default stripe size to 4k, as we have "FAST" mode turned on by
default.

20 years agoImplement "FAST" mode for GEOM_STRIPE class and turn it on by default.
pjd [Fri, 9 Jul 2004 14:30:09 +0000 (14:30 +0000)]
Implement "FAST" mode for GEOM_STRIPE class and turn it on by default.

In this mode you can setup even very small stripe size and you can be
sure that only one I/O request will be send to every disks in stripe.
It consumes some more memory, but if allocation fails, it will fall
back to "ECONOMIC" mode.

It is about 10 times faster for small stripe size than "ECONOMIC" mode
and other RAID0 implementations. It is even recommended to use this
mode and small stripe size, so our requests are always splitted.

One can still use "ECONOMIC" mode by setting kern.geom.stripe.fast to 0.
It is also possible to setup maximum memory which "FAST" mode can consume,
by setting kern.geom.stripe.maxmem from /boot/loader.conf.

20 years agoOnly detach consumers which are attached when we wither stuff away.
phk [Fri, 9 Jul 2004 14:06:17 +0000 (14:06 +0000)]
Only detach consumers which are attached when we wither stuff away.

Pointed out by: pjd

20 years agoAdd a JFLAG which can be used to speed up universe:
phk [Fri, 9 Jul 2004 13:55:50 +0000 (13:55 +0000)]
Add a JFLAG which can be used to speed up universe:
make universe JFLAG=-j12

20 years agoReduce namespace pollution.
des [Fri, 9 Jul 2004 13:52:42 +0000 (13:52 +0000)]
Reduce namespace pollution.

20 years agoNewbus returns a zeroed softc, so there's no need to call bzero() here.
cognet [Fri, 9 Jul 2004 13:42:05 +0000 (13:42 +0000)]
Newbus returns a zeroed softc, so there's no need to call bzero() here.

20 years agoWhen cleaning house, don't try to remove what isn't there.
des [Fri, 9 Jul 2004 13:15:32 +0000 (13:15 +0000)]
When cleaning house, don't try to remove what isn't there.

20 years agoBump document date.
des [Fri, 9 Jul 2004 11:44:49 +0000 (11:44 +0000)]
Bump document date.

Reminded by: ru

20 years agoAccumulate directory entries in a fixed-length sbuf, and uiomove them in
des [Fri, 9 Jul 2004 11:43:37 +0000 (11:43 +0000)]
Accumulate directory entries in a fixed-length sbuf, and uiomove them in
one go before returning.  This avoids calling uiomove() while holding
allproc_lock.

Don't adjust uio->uio_offset manually, uiomove() does that for us.

Don't drop allproc_lock before calling panic().

Suggested by: alfred

20 years agoThe type and name of sbuf_b{cat,cpy}()'s second argument have changed.
des [Fri, 9 Jul 2004 11:38:59 +0000 (11:38 +0000)]
The type and name of sbuf_b{cat,cpy}()'s second argument have changed.

20 years agoCosmetic adjustment to previous commit: name the second argument to
des [Fri, 9 Jul 2004 11:37:44 +0000 (11:37 +0000)]
Cosmetic adjustment to previous commit: name the second argument to
sbuf_bcat() and sbuf_bcpy() "buf" rather than "data".

20 years agoHave sbuf_bcat() and sbuf_bcpy() take a const void * instead of a
des [Fri, 9 Jul 2004 11:35:30 +0000 (11:35 +0000)]
Have sbuf_bcat() and sbuf_bcpy() take a const void * instead of a
const char *, since callers are likely to pass in pointers to all
kinds of structs and whatnot.

20 years ago- correctly set the return value for the copyin/out fault buffer to 1
grehan [Fri, 9 Jul 2004 11:00:41 +0000 (11:00 +0000)]
- correctly set the return value for the copyin/out fault buffer to 1
  so setfault would return correctly when a page fault was invalid
  (e.g. a syscall with a bad parameter).

  This caused an endless DSI loop, seen when running sendmail which
  does a setlogin() call with a NULL pointer.

- introduce KTR_SYSC tracing. expose the syscallnames[] array to
  make the tracing more readable.

20 years agoFixed markup.
ru [Fri, 9 Jul 2004 10:08:03 +0000 (10:08 +0000)]
Fixed markup.

20 years agoRemove the declaration of isnan() from this file. It is no longer
das [Fri, 9 Jul 2004 10:01:10 +0000 (10:01 +0000)]
Remove the declaration of isnan() from this file.  It is no longer
needed as of math.h v1.40, and its prototype is incorrect here.

20 years agoPolished markup.
ru [Fri, 9 Jul 2004 09:22:36 +0000 (09:22 +0000)]
Polished markup.

20 years agoUse and explicite 'sh' to run the scripts, because they may be checked
harti [Fri, 9 Jul 2004 08:59:15 +0000 (08:59 +0000)]
Use and explicite 'sh' to run the scripts, because they may be checked
out non-executable.

20 years agoFixed markup and punctuation.
ru [Fri, 9 Jul 2004 07:26:15 +0000 (07:26 +0000)]
Fixed markup and punctuation.

20 years agoBump document date for recent changes.
das [Fri, 9 Jul 2004 06:37:44 +0000 (06:37 +0000)]
Bump document date for recent changes.

Prodded by: ru

20 years agoMarkup nit picking.
ru [Fri, 9 Jul 2004 06:16:43 +0000 (06:16 +0000)]
Markup nit picking.

Reviewed by: joerg

20 years agoEliminate struct shm_handle. It is an unnecessary level of indirection to
alc [Fri, 9 Jul 2004 05:28:38 +0000 (05:28 +0000)]
Eliminate struct shm_handle.  It is an unnecessary level of indirection to
a vm_object.

20 years agoUse ETHER_IS_MULTICAST() consistently in ether_resolvemulti().
bms [Fri, 9 Jul 2004 05:26:27 +0000 (05:26 +0000)]
Use ETHER_IS_MULTICAST() consistently in ether_resolvemulti().

Reviewed by: jmallett

20 years agoReport input errors instead of ignoring them.
tjr [Fri, 9 Jul 2004 05:15:46 +0000 (05:15 +0000)]
Report input errors instead of ignoring them.

20 years agoFix mismerge of fdc. Also, OLDCARD never was supported on amd64, so
imp [Fri, 9 Jul 2004 05:05:13 +0000 (05:05 +0000)]
Fix mismerge of fdc.  Also, OLDCARD never was supported on amd64, so
remove fdc attachment for it.

20 years agoDocument these functions as being in libm, not libc. Some of them
das [Fri, 9 Jul 2004 03:33:00 +0000 (03:33 +0000)]
Document these functions as being in libm, not libc.  Some of them
*are* in libc for historical reasons, but programmers should not rely
on that fact.

Also remove a BUGS section that is not relevant here.

20 years agoImplement the classification macros isfinite(), isinf(), isnan(), and
das [Fri, 9 Jul 2004 03:32:40 +0000 (03:32 +0000)]
Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by: kris

20 years agoDefine the following macros in terms of [gi]cc builtins when the
das [Fri, 9 Jul 2004 03:31:09 +0000 (03:31 +0000)]
Define the following macros in terms of [gi]cc builtins when the
builtins are available: HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY,
and NAN.  These macros now expand to floating-point constant
expressions rather than external references, as required by C99.
Other compilers will retain the historical behavior.  Note that
it is not possible say, e.g.
#define HUGE_VAL 1.0e9999
because the above may result in diagnostics at translation time
and spurious exceptions at runtime.  Hence the need for compiler
support for these features.

Also use builtins to implement the macros isgreater(),
isgreaterequal(), isless(), islessequal(), islessgreater(),
and isunordered() when such builtins are available.
Although the old macros are correct, the builtin versions
are much faster, and they avoid double-expansion problems.

20 years agoDocument compile-time switches here as I'm going to yank them from
bms [Fri, 9 Jul 2004 02:38:25 +0000 (02:38 +0000)]
Document compile-time switches here as I'm going to yank them from
if_de.c.

20 years agoUpdate for multibyte character support: remove BUGS and change the
tjr [Fri, 9 Jul 2004 02:33:46 +0000 (02:33 +0000)]
Update for multibyte character support: remove BUGS and change the
description of the -c option to refer to "values" instead of "byte values".

20 years agoFurther improve locking in xl(4):
bms [Fri, 9 Jul 2004 02:28:23 +0000 (02:28 +0000)]
Further improve locking in xl(4):

 - Avoid an additional lock acquire/release when leaving xl_intr(), by
   changing xl_start*() to xl_start*_locked(), and calling the appropriate
   routine by chip revision (as the DMA descriptors are different).

 - Simplify the appropriate routines now that they are called with the
   lock held.

This should save a significant amount of CPU cycles spent on servicing
each interrupt for both UP and SMP whilst remaining MPSAFE.

Tested by: rwatson

20 years agoApply the long-overdue hatchet of style(9) death to this file.
bms [Fri, 9 Jul 2004 02:19:07 +0000 (02:19 +0000)]
Apply the long-overdue hatchet of style(9) death to this file.

20 years agoAdd support for multibyte characters. The challenge here was to use
tjr [Fri, 9 Jul 2004 02:08:07 +0000 (02:08 +0000)]
Add support for multibyte characters. The challenge here was to use
data structures that scale better with large character sets, instead of
arrays indexed by character value:
- Sets of characters to delete/squeeze are stored in a new "cset" structure,
which is implemented as a splay tree of extents. This structure has the
ability to store character classes (ala wctype(3)), but this is not
currently fully utilized.
- Mappings between characters are stored in a new "cmap" structure, which
is also a splay tree.
- The parser no longer builds arrays containing all the characters in a
particular class; instead, next() determines them on-the-fly using
nextwctype(3).

20 years agoRemove spl()'s from do_sendfile().
rwatson [Fri, 9 Jul 2004 01:46:03 +0000 (01:46 +0000)]
Remove spl()'s from do_sendfile().