Commit Graph

58436 Commits

Author SHA1 Message Date
jhb
cb7d4cb6d4 Catch up to header include changes:
- <sys/mutex.h> now requires <sys/systm.h>
- <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
2001-03-28 09:17:56 +00:00
jhb
ae991ce0b7 Use mtx_initiaalized() rather than violating the internals of the mutex
structure.
2001-03-28 09:04:25 +00:00
jhb
116b99dcbc Rework the witness code to work with sx locks as well as mutexes.
- Introduce lock classes and lock objects.  Each lock class specifies a
  name and set of flags (or properties) shared by all locks of a given
  type.  Currently there are three lock classes: spin mutexes, sleep
  mutexes, and sx locks.  A lock object specifies properties of an
  additional lock along with a lock name and all of the extra stuff needed
  to make witness work with a given lock.  This abstract lock stuff is
  defined in sys/lock.h.  The lockmgr constants, types, and prototypes have
  been moved to sys/lockmgr.h.  For temporary backwards compatability,
  sys/lock.h includes sys/lockmgr.h.
- Replace proc->p_spinlocks with a per-CPU list, PCPU(spinlocks), of spin
  locks held.  By making this per-cpu, we do not have to jump through
  magic hoops to deal with sched_lock changing ownership during context
  switches.
- Replace proc->p_heldmtx, formerly a list of held sleep mutexes, with
  proc->p_sleeplocks, which is a list of held sleep locks including sleep
  mutexes and sx locks.
- Add helper macros for logging lock events via the KTR_LOCK KTR logging
  level so that the log messages are consistent.
- Add some new flags that can be passed to mtx_init():
  - MTX_NOWITNESS - specifies that this lock should be ignored by witness.
    This is used for the mutex that blocks a sx lock for example.
  - MTX_QUIET - this is not new, but you can pass this to mtx_init() now
    and no events will be logged for this lock, so that one doesn't have
    to change all the individual mtx_lock/unlock() operations.
- All lock objects maintain an initialized flag.  Use this flag to export
  a mtx_initialized() macro that can be safely called from drivers.  Also,
  we on longer walk the all_mtx list if MUTEX_DEBUG is defined as witness
  performs the corresponding checks using the initialized flag.
- The lock order reversal messages have been improved to output slightly
  more accurate file and line numbers.
2001-03-28 09:03:24 +00:00
jhb
7cf193c510 - Resort some includes to deal with the new witness code coming in shortly.
- Make sure we have Giant locked before calling coredump() in sigexit().

Spotted by:	peter (2)
2001-03-28 08:41:04 +00:00
jhb
1ae13d09e6 Add a manpage for the critical_enter/exit() functions. 2001-03-28 07:30:58 +00:00
jlemon
3cd3e32073 Back out previous commit until I figure out a way to do it properly.
We really want to be able to say "auto NWAY", "limited NWAY", and
"no NWAY".  Unfortunately, this does not appear to be possible with
the current mediaopt structure.
2001-03-28 07:01:45 +00:00
markm
0c344feffe Fix nasty corruption problem where a 64bit variable was being used
(overflowed) to catch a 256bit result.

Hard work done by:	jhb
2001-03-28 06:27:42 +00:00
alfred
d0159580d4 Add support for the Addtron AWA100 PCI wireless card.
The AWA100 is a PCI board with a PLX 9052 chip that's used to talk to
the pccard inserted into the board.

Remove a redundant $FreeBSD while I'm here.
2001-03-28 05:05:05 +00:00
jhb
7274025831 Don't explicitly zero p_intr_nesting_level and p_aioinfo in fork. 2001-03-28 03:14:14 +00:00
jhb
280bffc7e8 - Fix a whitespace bogon with p_blocked.
- Move p_intr_nesting_level, p_aioinfo, and p_ithd into the zero'd area
  so that we don't have to explicitly zero them during fork().
2001-03-28 03:08:59 +00:00
jhb
28de7e9aec Switch from save/disable/restore_intr() to critical_enter/exit(). 2001-03-28 03:06:10 +00:00
jhb
0086022f05 Catch up to the mtx_saveintr -> mtx_savecrit change. 2001-03-28 02:46:21 +00:00
jhb
d646046cc1 Use mtx_intr_enable() on sched_lock to ensure child processes always start
with interrupts enabled rather than calling the no-longer MI function
enable_intr().  This is bogus anyways and in theory shouldn't even be
needed.
2001-03-28 02:44:11 +00:00
jhb
12c7239c8f - Switch from using save/disable/restore_intr to using critical_enter/exit
and change the u_int mtx_saveintr member of struct mtx to a critical_t
  mtx_savecrit.
- On the alpha we no longer need a custom _get_spin_lock() macro to avoid
  an extra PAL call, so remove it.
- Partially fix using mutexes with WITNESS in modules.  Change all the
  _mtx_{un,}lock_{spin,}_flags() macros to accept explicit file and line
  parameters and rename them to use a prefix of two underscores.  Inside
  of kern_mutex.c, generate wrapper functions for
  _mtx_{un,}lock_{spin,}_flags() (only using a prefix of one underscore)
  that are called from modules.  The macros mtx_{un,}lock_{spin,}_flags()
  are mapped to the __mtx_* macros inside of the kernel to inline the
  usual case of mutex operations and map to the internal _mtx_* functions
  in the module case so that modules will use WITNESS and KTR logging if
  the kernel is compiled with support for it.
2001-03-28 02:40:47 +00:00
dd
657e60faab Mention that the vga(4) driver supports 90-column video modes.
PR:		26050
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
Approved by:	nik
2001-03-28 02:32:10 +00:00
jhb
91626ea38f - Add the new critical_t type used to save state inside of critical
sections.
- Add implementations of the critical_enter() and critical_exit() functions
  and remove restore_intr() and save_intr().
- Remove the somewhat bogus disable_intr() and enable_intr() functions on
  the alpha as the alpha actually uses a priority level and not simple bit
  flag on the CPU.
2001-03-28 02:31:54 +00:00
jhb
ceb23d4b11 Previous commit message was bogus:
- Switch to using critical_enter/exit instead of save/disable/restore_intr.
2001-03-28 02:07:28 +00:00
jhb
00bb5d94d8 Revert previous commit which had a bogus message. It actually just
disabled the somewhat annoying KTR log trace for clock interrupts.
2001-03-28 02:03:29 +00:00
jhb
c17edfd572 Previous commit message was bogus:
- Catch up to rename of mtx_saveintr to mtx_savecrit within struct mtx.
2001-03-28 02:01:34 +00:00
jhb
4fd8501f7b Previous commit message was bogus, here's the real one:
- Switch to using critical_enter/exit instead of save/disable/restore_intr.
- Disable interrupts in Debugger().

This second change wasn't really supposed to go in, but since it's in
there and is useful so that one doesn't get spammed with clock interrupts
while in ddb, I'll leave it in unless people want it reverted.
2001-03-28 01:59:40 +00:00
jhb
f4f5ff947d The previous commit message is bogus, this actually just removed an
unused variable to silence a warning.
2001-03-28 01:56:13 +00:00
jhb
b1ca8c34b1 - Include <machine/prom.h> to get the prototype for prom_halt().
- If there is no gdb device, just return without trying to return any
  value since gdb_handle_exception() returns void.
- When calling prom_halt(), pass in a value telling it to actually halt
  and not to randomly choose whether or not to halt or reboot depending on
  whatever value happened to be in a0 when the call was made.
2001-03-28 01:54:06 +00:00
ps
bfe78d3cea Last commit was broken.. It always prints '[CTRL-C to abort]'.
Move duplicate code for printing the status of the dump and checking
for abort into a separate function.

Pointy hat to:	me
2001-03-28 01:37:29 +00:00
gallatin
3fe1b7e192 Check whether we need to do a full restore after handling ASTs. If
an AST results in a signal being delivered, we'll need to do a full register
restore so as to properly setup the signal handler.  This is somewhat of
a pessimization, because ast() will be called twice in this case.

This fixes several problems that have been reported where signal intensive
userland apps (most notably dump) have been SEGV'ing for no fault of their
own.

Thanks to Peter Jeremy <peter.jeremy@alcatel.com.au> for presenting the
AST scenario which led to me fiinally figuring this out.

Reviewed by: jhb
2001-03-28 01:19:41 +00:00
rwatson
af5c142ebd o De-uglify IMPLEMENTATION NOTES section by removing unnecessary use of
.Fx
2001-03-28 01:03:33 +00:00
brian
10711cb0d5 Add some comments to two examples and extend a ``set ifaddr''. 2001-03-28 00:23:30 +00:00
ache
e226dbb117 Restore part of my fix spammed in v1.23:
fseeko(file_size, SEEK_SET) -> fseek(0L, SEEK_END)
1) File may grows between operations, so fseeko to file_size may miss
2) 0L, SEEK_END is the same code using in tail in all other places
2001-03-27 23:24:25 +00:00
jkh
cd76d6ef20 Update the acknowledgements section. 2001-03-27 22:06:37 +00:00
wpaul
54b2849efe Finally fix __yp_ping(). We can't use the old locally defined clntudp_call()
method anymore since the code inside the RPC library has changed too much.
Now that the clnt_dg module has the necessary code internally, we can yank
out the local method code and turn on the ASYNC hack with clnt_control().
This will make the -m flag work again.
2001-03-27 21:29:31 +00:00
wpaul
5927b134b9 Add a CLSET_ASYNC command, which allows us to (ab)use the clnt_dg transport
to make asynchronous RPCs. This is needed to help fix ypbind, which can no
longer override the clnt_dg_call() method (formerly the clntudp_call()
method) due to all the internal descriptor locking code in TI-RPC. Turning
on this flag allows us to send an RPC request, then return immediately,
and handle a reply later, rather than being forced to do the request
and reply in a single function call.

Also fix a byte ordering bug: when clnt_dg_call() increments the XID
prior to transmitting a request, it uses the raw value, which is wrong.
The XID is stored in network byte order, i.e. big-endian. The CLSET_XID
and CLGET_XID commands in clnt_dg_control() use ntohl()/htonl() to get
the byte ordering right, but because clnt_dg_call() does not do this,
using CLSET_XID/CLGET_XID doesn't actually work, unless you're on a
big endian host, which we aren't (yet). Fix clnt_dg_call() to byte swap
properly when doing the increment.
2001-03-27 21:27:33 +00:00
bmah
82d0954c46 New release notes: Filesystem ACLs, getfacl(1) and setfacl(1).
Submitted by:	rwatson
2001-03-27 21:17:18 +00:00
dwmalone
aceae36c59 Don't leak the memory we've just malloced if we can't find the
process we're looking for. (I don't think this can currently
happen, but it depends how the function is called).

PR:		25932
Submitted by:	David Xu <davidx@viasoft.com.cn>
2001-03-27 20:49:51 +00:00
dwmalone
b12b97e05e Fix tail to work on files bigger than 2GB.
PR:		14786
Reviewed by:	iedowse
2001-03-27 20:37:34 +00:00
cwt
54127cc6ae Document LOG_CONSOLE. 2001-03-27 19:55:53 +00:00
markm
a30a7bf759 Add full PAM support for account management and sessions.
The PAM_FAIL_CHECK and PAM_END macros in su.c came from the util-linux
package's PAM patches to the BSD login.c

Submitted by:	"David J. MacKenzie" <djm@web.us.uu.net>
2001-03-27 19:40:51 +00:00
obrien
8065dced06 Make rev 1.5 better match the rest of dump(8)'s output. 2001-03-27 19:38:34 +00:00
obrien
102c4ff0c4 Do not exit if unable to read /etc/dumpdates or create it.
If one is trying to dump or repair an ill system, give the user a fighting
chance.  Refusing to operate w/o a very non-critical file (feature) is
just plain stupid.
2001-03-27 19:28:00 +00:00
cokane
c843432cb6 Remove NOMAN 2001-03-27 19:04:09 +00:00
ru
f85a17a1d7 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
obrien
e251cc3bd1 Formatting fix for rev 1.298 where I did not take enough care. 2001-03-27 17:07:37 +00:00
obrien
b45c7e6fc5 Mirror the newfs(8) defaults change I made in rev 1.33 of newfs.c where
I made `22' the default number of cylinders per group.
2001-03-27 17:05:23 +00:00
ru
6b679f791a Fix LDADD and add missing DPADD. 2001-03-27 16:45:16 +00:00
sobomax
26e420a9c6 Describe details of importing. 2001-03-27 16:27:31 +00:00
ru
bbba6607df Traverse ${DESTDIR}/usr/include in lexographical order.
This should fix problems reported recently on -current.
2001-03-27 16:15:25 +00:00
ache
3cbb727bdd Add comment explaining why size not passed directly to mmap, i.e. not relay
on its check.
KNF multi-line comments
(inspired by bde)
2001-03-27 15:53:48 +00:00
ru
62802d4075 Do not override the ``install'' target. 2001-03-27 15:14:49 +00:00
ru
97d11d7b45 MAN[1-9] -> MAN. 2001-03-27 14:59:06 +00:00
ru
5155d89f34 MAN[1-9] -> MAN. 2001-03-27 14:07:31 +00:00
ru
599c673bb9 MAN[1-9] -> MAN. 2001-03-27 13:58:21 +00:00
sobomax
87dd64ecf7 Update FreeBSD translations to match 1.4.1 (actually just copied Enslish
messages as I don't know de, pl and fr).
2001-03-27 13:53:08 +00:00