Commit Graph

57663 Commits

Author SHA1 Message Date
jhb
44b0453b59 Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
jhb
0efe7f19be Protect SIGDELSET of p_siglist with the proc lock. 2001-03-07 03:34:55 +00:00
jhb
0f64de3813 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
76a3b7a8fb Proc locking. 2001-03-07 03:27:32 +00:00
jhb
cb62afb44c Use the proc lock to protect access to p_sigacts->ps_sigintr. 2001-03-07 03:26:39 +00:00
des
22209af026 Fix a formatting bug (MFC candidate) 2001-03-07 03:22:11 +00:00
jhb
f315adf3e2 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
f4b79cb5b1 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
d6969a725b Just use proc lock to protect reading of p_pptr rather than a proctree
lock.
2001-03-07 03:18:36 +00:00
jhb
e83dac8c96 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
8d0f719bf3 Protect read to p_pptr with proc lock rather than proctree lock. 2001-03-07 03:10:20 +00:00
jhb
4341a84166 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
377240946c - Proc locking.
- Remove some unneeded spl()'s.
2001-03-07 03:06:18 +00:00
jhb
c434e6ea6c Lock the process while sending it SIGARLM and updating p_realtimer. 2001-03-07 03:02:56 +00:00
jhb
72d3d31e96 - Proc locking.
- Remove unneeded spl()'s.
2001-03-07 03:01:53 +00:00
jhb
78b4f51fab - 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
157e2aac95 Lock initproc when we send SIGINT to init during shutdown. 2001-03-07 02:50:09 +00:00
jhb
c1beefd6af - 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
4b1f571f83 - 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
3d1a44cd56 - 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
b6e227dd17 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
50c16d6e21 - 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
6b3e8d1743 - 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
4f238e0d87 Protect p_flag with the proc lock. 2001-03-07 02:07:56 +00:00
jhb
3f330f1780 - 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
e7ac0a66fd - 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
32bd7ccaa2 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
d232053cc4 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
1da8282c33 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
74bf2645d6 Get the arguments to the KASSERT() printf() in SX_ASSERT_XLOCKED() in
the proper order.
2001-03-06 22:41:31 +00:00
jkh
0ecc68728f 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
2b02448def Split out the ata probes in seperate files for each bus type. 2001-03-06 21:43:46 +00:00
jhb
c89fb41583 Indent the comment about the Alpha palette evilness correctly.
Noticed by:	bde
2001-03-06 20:36:06 +00:00
phk
204d269d7f Silence the sizeof warning from struct kinfo_proc 2001-03-06 18:37:47 +00:00
des
168df4d9a1 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
070a4fd2c7 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
6980695ad6 A quick and dirty port of libstand to ia64. 2001-03-06 16:11:36 +00:00
dfr
0e04b31ae2 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
e8dc841519 Make this compile. Still need to write/borrow a working setjmp. 2001-03-06 16:07:41 +00:00
dfr
7e10a3c091 Use ieee floats on ia64. 2001-03-06 16:06:38 +00:00
alc
d1badbe470 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
cb29b08686 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
44b9d422b2 Add (and document) options for showing only listening or connected sockets. 2001-03-06 13:48:38 +00:00
peter
c4193008c9 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
4764a83b08 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
2195a95064 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
df6f86bea7 Grammar police. 2001-03-06 10:19:12 +00:00
markm
207867400c Fix markup.
Submitted by:	ru
2001-03-06 10:08:36 +00:00
bp
3a2aabb8f2 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
cacefaf6c8 Cosmetic change to the probe printf's 2001-03-06 09:42:46 +00:00