Commit Graph

57663 Commits

Author SHA1 Message Date
jhb
9cd254601b Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
jhb
ace71d59bf Protect SIGDELSET of p_siglist with the proc lock. 2001-03-07 03:34:55 +00:00
jhb
28e79b61ad Proc locking including using proc lock in place of proctree where
appropriate and locking processes while we signal them.
2001-03-07 03:28:50 +00:00
jhb
f307208ba9 Proc locking. 2001-03-07 03:27:32 +00:00
jhb
4d5490f460 Use the proc lock to protect access to p_sigacts->ps_sigintr. 2001-03-07 03:26:39 +00:00
des
41113a8cdf Fix a formatting bug (MFC candidate) 2001-03-07 03:22:11 +00:00
jhb
6b93e2c5c0 Just hold the proc lock while getting the parent's PID rather than a
proctree lock.
2001-03-07 03:21:26 +00:00
jhb
83d74ad162 Use the proc lock to protect p_pptr when waking up our parent in cpu_exit()
and remove the mpfixme() message that is now fixed.
2001-03-07 03:20:15 +00:00
jhb
9862451770 Just use proc lock to protect reading of p_pptr rather than a proctree
lock.
2001-03-07 03:18:36 +00:00
jhb
23113ee580 Proc locking identical to that of linprocfs' vnops except that we hold the
proc lock while calling psignal.
2001-03-07 03:15:05 +00:00
jhb
47cd1b179f Protect read to p_pptr with proc lock rather than proctree lock. 2001-03-07 03:10:20 +00:00
jhb
2c951b9c74 Proc locking. Lock around psignal() and also ensure both an exclusive
proctree lock and the process lock are held when updating p_pptr and
p_oppid.  When we are just reaading p_pptr we only need the proc lock and
not a proctree lock as well.
2001-03-07 03:09:40 +00:00
jhb
53e75509c0 - Proc locking.
- Remove some unneeded spl()'s.
2001-03-07 03:06:18 +00:00
jhb
0bc406044c Lock the process while sending it SIGARLM and updating p_realtimer. 2001-03-07 03:02:56 +00:00
jhb
3ef36efa7c - Proc locking.
- Remove unneeded spl()'s.
2001-03-07 03:01:53 +00:00
jhb
d18d94674a - Proc locking. Most of signal handling is now MP safe and doesn't require
Giant.  The only exception is the CANSIGNAL() macro.  Unlocking the proc
  lock around sendsig() in trapsignal() is also questionable.  Note that
  the functions sigexit(), psignal(), and issignal() must be called with
  the proc lock of the process in question held.  postsig() and
  trapsignal() should not be called with the proc lock held, but they
  also do not require Giant anymore either.
- Remove spl's that are now no longer needed as they are fully replaced.
2001-03-07 02:59:54 +00:00
jhb
7c5cd82d2e Lock initproc when we send SIGINT to init during shutdown. 2001-03-07 02:50:09 +00:00
jhb
46333fa556 - Add an extra check in priority_propagation() for UP systems to ensure we
don't end up back at ourselves which would indicate deadlock.
- Add the proc lock to the witness dup_list as we may hold more than one
  process lock at a time.
- Don't assert a mutex is owned in _mtx_unlock_sleep() as that is too late.
  We do the checks in the macros instead.
2001-03-07 02:45:15 +00:00
jhb
d936d6d9be - Use _PHOLD and move it before a PROC_UNLOCK to reduce the number of
mutex operations in kthread_create().
- Lock a kthread's proc before changing its parent via proc_reparent().
- Test P_KTHREAD not P_SYSTEM in kthread_suspend() and kthread_resume().
  P_SYSTEM just means that the process shouldn't be swapped and is used
  for vinum's daemon for example.
- Lock all the signal state used for suspending and resuming kthreads with
  the proc lock.
2001-03-07 02:36:47 +00:00
jhb
8dbcf4e47b - Lock the forklist with an sx lock.
- Add proc locking to fork1().  Always lock the child procoess (new
  process) first when both processes need to be locked at the same
  time.
- Remove unneeded spl()'s as the data they protected is now locked.
- Ensure that the proctree is exclusively locked and the new process is
  locked when setting up the parent process pointer.
- Lock the check for P_KTHREAD in p_flag in fork_exit().
2001-03-07 02:30:39 +00:00
jhb
c7d1d65499 Check to see if p_fd is NULL before derferencing it in checkdirs(). It's
possible for us to see a process in the early stages of fork before p_fd
has been initialized.  Ideally, we wouldn't stick a process on the allproc
list until it was fully created however.
2001-03-07 02:25:13 +00:00
jhb
fc1cdb0ea4 - Call proc_reparent() when handing a process off to init in exit rather
than dinking around in the process lists explicitly.
- Hold both the proctree lock and proc lock of the child process when
  reparenting a process via proc_reparent.
- Lock processes while sending them signals.
- Miscellaenous proc locking.
- proc_reparent() now asserts that the child is locked in addition to an
  exclusive proctree lock.
2001-03-07 02:22:31 +00:00
jhb
e2c9c435ff - Hold both an exclusive proctree lock and the proc lock when reparenting
a traced process during exit.
- Lock the parent process while sending it SIGCHLD.
2001-03-07 02:17:43 +00:00
jhb
6958204c78 Protect p_flag with the proc lock. 2001-03-07 02:07:56 +00:00
jhb
9629364e62 - Include <sys/systm.h> for KASSERT().
- Move the _mtx_assert() prototype up to the top of the file with the rest
  of the function prototypes.
- Define all the mtx_foo() macros in terms of mtx_foo_flags().
- Add a KASSERT() to check for invalid options in mtx_lock_flags().
- Move the mtx_assert() to ensure a mutex is owned before releasing it
  in front of WITNESS_EXIT() in all the mtx_unlock_* macros.
- Change the MPASS* macros to be on #ifdef INVARIANTS, not just #ifdef
  MUTEX_DEBUG since most of them check to see that the mutex functions are
  called properly.  Define MPASS4() in terms of KASSERT() to do this.
- Define MPASS{,[23]} in terms of MPASS4() to simplify things and avoid
  code duplication.
2001-03-07 02:06:08 +00:00
jhb
5d3041fa5c - In the locking key for struct proc, generalize the '+' symbol to mean
that write access to a member requires both locks and read access only
  requires one of the given locks.  Convert instances of '(c+)' to
  '(c + k)' as a result.
- Change p_pptr from (e) to (c + e).
- Change p_oppid from (c) to (c + e).
- Change p_args from (b?) to (c + k).
- Move the actual work of STOPEVENT, PHOLD, and PRELE to _STOPEVENT,
  _PHOLD, and _PRELE.  The new macros do not acquire the proc lock and
  simply assert that it is held.  The non _ prefixed macros acquire the
  proc lock and then call the _ prefixed macros.
- Add a PROC_LOCK_NOSWITCH() macro to be used when releasing the proc lock
  while already holding a spin lock (usually sched_lock).
- Add a PROC_LOCK_ASSERT() macro to be used to make assertions about the
  proc lock.  It takes the usual mtx_assert() macro arguments as its
  second argument.
2001-03-07 01:51:34 +00:00
jhb
74a74a3282 Back out the pmap_map() change for now, it isn't completely stable on the
i386.
2001-03-07 01:04:17 +00:00
sanpei
690911ace6 add new PC-Card entry, IO Data WN-B11/PCM
Submitted by:	[FreeBSD-users-jp 59373]
		"Masatake E. Hori" <eddie@luft.geo.tsukuba.ac.jp>
2001-03-07 00:58:52 +00:00
jhb
84abec1e65 In order to avoid recursing on the backing mutex for sx locks in the
INVARIANTS case, define the actual KASSERT() in _SX_ASSERT_[SX]LOCKED
macros that are used in the sx code itself and convert the
SX_ASSERT_[SX]LOCKED macros to simple wrappers that grab the mutex for the
duration of the check.
2001-03-06 23:13:15 +00:00
jhb
8e10dd4dec Get the arguments to the KASSERT() printf() in SX_ASSERT_XLOCKED() in
the proper order.
2001-03-06 22:41:31 +00:00
jkh
993485c5d9 Sawfish is invoked by the gnome stuff automatically if it exists -
we don't need to start it explicitly.

Noted by:	"Jose M. Alcaide" <jose@we.lc.ehu.es>
2001-03-06 21:46:03 +00:00
sos
295e425b3c Split out the ata probes in seperate files for each bus type. 2001-03-06 21:43:46 +00:00
jhb
1b15df8a70 Indent the comment about the Alpha palette evilness correctly.
Noticed by:	bde
2001-03-06 20:36:06 +00:00
phk
f842c391b4 Silence the sizeof warning from struct kinfo_proc 2001-03-06 18:37:47 +00:00
des
7781e1edf7 Make the KASSERTs report the correct function names.
Fix two off-by-one errors that would sometimes cause the final length of
the sbuf to include the trailing zero.
2001-03-06 17:48:26 +00:00
rwatson
171a68d94e o Introduce filesystem-independent POSIX.1e ACL utility routines to
support implementations of ACLs in file systems.  Introduce the
  following new functions:

      vaccess_acl_posix1e()          vaccess() that accepts an ACL
      acl_posix1e_mode_to_perm()     Convert mode bits to ACL rights
      acl_posix1e_mode_to_entry()    Build ACL entry from mode/uid/gid
      acl_posix1e_perms_to_mode()    Generate file mode from ACL
      acl_posix1e_check()            Syntax verification for ACL

  These functions allow a file system to rely on central ACL evaluation
  and syntax checking, as well as providing useful utilities to
  allow ACL-based file systems to generate mode/owner/etc information
  to return via VOP_GETATTR(), and to support file systems that split
  their ACL information over their existing inode storage (mode, uid,
  gid) and extended ACL into extended attributes (additional users,
  groups, ACL mask).

o Add prototypes for exported functions to sys/acl.h, sys/vnode.h

Reviewed by:	trustedbsd-discuss, freebsd-arch
Obtained from:	TrustedBSD Project
2001-03-06 17:28:24 +00:00
dfr
1915fa0c31 A quick and dirty port of libstand to ia64. 2001-03-06 16:11:36 +00:00
dfr
ad0c458829 Use relative paths to find byte_swap_*.S to make it easier to use these
from libstand.
2001-03-06 16:08:19 +00:00
dfr
afe6e1ce9d Make this compile. Still need to write/borrow a working setjmp. 2001-03-06 16:07:41 +00:00
dfr
4d5efcc8bc Use ieee floats on ia64. 2001-03-06 16:06:38 +00:00
alc
499c6382fb Add a missing splx() to aio_fphysio(). (This change is a no-op in -5.0,
but potentially significant in -4.x.)

Eliminate a pointless parameter to aio_fphysio().

Remove unnecessary casts from aio_fphysio() and aio_physwakeup().
2001-03-06 15:54:38 +00:00
dfr
f689e43b38 Pick up the environment variable ${NM} if it exists and use that to list
symbols. This allows lorder to be used more easily in a cross-build
environment.
2001-03-06 15:00:32 +00:00
des
d57c826a42 Add (and document) options for showing only listening or connected sockets. 2001-03-06 13:48:38 +00:00
peter
2f5206c0e8 dcphy depends on pci. This repairs the 'ed' driver's ability to be run
on isa-only systems without the pci bus code.
2001-03-06 12:10:44 +00:00
dwmalone
927bd65960 Spell what was originally "unsigned long" as "unsigned long" again,
to cut down on some compiler warnings caused by lexically mismatched
types.

Reviewed by:	bde
2001-03-06 11:35:04 +00:00
dwmalone
59562180ca Fix typo: define SX_ASSERT_XLOCKED not SX_ASSERT_XLOCKER in
non-INVARIANTS case.

PR:		25567
Submitted by:	nnd@mail.nsk.ru
2001-03-06 11:06:56 +00:00
markm
58f4338eb4 Grammar police. 2001-03-06 10:19:12 +00:00
markm
f0fcbd1ff4 Fix markup.
Submitted by:	ru
2001-03-06 10:08:36 +00:00
bp
342407e6c4 A name of the file can change while its id stays the same. So, we have
to update it as well.

Remove unused function.
2001-03-06 09:59:18 +00:00
sos
a0c9a8a692 Cosmetic change to the probe printf's 2001-03-06 09:42:46 +00:00