Commit Graph

57521 Commits

Author SHA1 Message Date
John Baldwin
412503ae46 Protect SIGDELSET of p_siglist with the proc lock. 2001-03-07 03:34:55 +00:00
John Baldwin
15e9ec5153 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
John Baldwin
e65897c381 Proc locking. 2001-03-07 03:27:32 +00:00
John Baldwin
28aa95b6ee Use the proc lock to protect access to p_sigacts->ps_sigintr. 2001-03-07 03:26:39 +00:00
Dag-Erling Smørgrav
150fb21bf8 Fix a formatting bug (MFC candidate) 2001-03-07 03:22:11 +00:00
John Baldwin
f553c1794d Just hold the proc lock while getting the parent's PID rather than a
proctree lock.
2001-03-07 03:21:26 +00:00
John Baldwin
ff655691d8 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
John Baldwin
88411ba791 Just use proc lock to protect reading of p_pptr rather than a proctree
lock.
2001-03-07 03:18:36 +00:00
John Baldwin
931cccf603 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
John Baldwin
30ac5d0f9e Protect read to p_pptr with proc lock rather than proctree lock. 2001-03-07 03:10:20 +00:00
John Baldwin
c65c565b44 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
John Baldwin
731a1aea4c - Proc locking.
- Remove some unneeded spl()'s.
2001-03-07 03:06:18 +00:00
John Baldwin
378240232a Lock the process while sending it SIGARLM and updating p_realtimer. 2001-03-07 03:02:56 +00:00
John Baldwin
eed4805444 - Proc locking.
- Remove unneeded spl()'s.
2001-03-07 03:01:53 +00:00
John Baldwin
628d2653d6 - 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
John Baldwin
87729a2b64 Lock initproc when we send SIGINT to init during shutdown. 2001-03-07 02:50:09 +00:00
John Baldwin
1b43703b47 - 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
John Baldwin
6451855f6d - 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
John Baldwin
57934cd3c8 - 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
John Baldwin
2aa33d2f1e 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
John Baldwin
c65437a326 - 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
John Baldwin
f664e29076 - 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
John Baldwin
0087374731 Protect p_flag with the proc lock. 2001-03-07 02:07:56 +00:00
John Baldwin
c4a21abf00 - 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
John Baldwin
0db10dac4b - 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
John Baldwin
4a01ebd482 Back out the pmap_map() change for now, it isn't completely stable on the
i386.
2001-03-07 01:04:17 +00:00
MIHIRA Sanpei Yoshiro
1b6c0f0436 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
John Baldwin
7331c2a252 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
John Baldwin
e480e1ab93 Get the arguments to the KASSERT() printf() in SX_ASSERT_XLOCKED() in
the proper order.
2001-03-06 22:41:31 +00:00
Jordan K. Hubbard
e18638480d 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
Søren Schmidt
331c488d69 Split out the ata probes in seperate files for each bus type. 2001-03-06 21:43:46 +00:00
John Baldwin
cf0a305e5b Indent the comment about the Alpha palette evilness correctly.
Noticed by:	bde
2001-03-06 20:36:06 +00:00
Poul-Henning Kamp
923e3066c2 Silence the sizeof warning from struct kinfo_proc 2001-03-06 18:37:47 +00:00
Dag-Erling Smørgrav
cab5b963a0 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
Robert Watson
5293465fef 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
Doug Rabson
a8c60cbef4 A quick and dirty port of libstand to ia64. 2001-03-06 16:11:36 +00:00
Doug Rabson
ac9a4fc876 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
Doug Rabson
5e1202d5d3 Make this compile. Still need to write/borrow a working setjmp. 2001-03-06 16:07:41 +00:00
Doug Rabson
62b8ce411f Use ieee floats on ia64. 2001-03-06 16:06:38 +00:00
Alan Cox
9c8a2647f6 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
Doug Rabson
7172dc3b54 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
Dag-Erling Smørgrav
a0581bbcc2 Add (and document) options for showing only listening or connected sockets. 2001-03-06 13:48:38 +00:00
Peter Wemm
13d609b82e 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
David Malone
f88eb01140 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
David Malone
f4b9935804 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
Mark Murray
adcaec54eb Grammar police. 2001-03-06 10:19:12 +00:00
Mark Murray
63fe79c5e8 Fix markup.
Submitted by:	ru
2001-03-06 10:08:36 +00:00
Boris Popov
1cebc48fb3 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
Søren Schmidt
e0db7375ba Cosmetic change to the probe printf's 2001-03-06 09:42:46 +00:00
Ruslan Ermilov
79cd39f2dd mdoc(7) police: Use Vt for variable types. 2001-03-06 08:22:10 +00:00