aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/filedesc.h
diff options
context:
space:
mode:
authorSeigo Tanimura <tanimura@FreeBSD.org>2002-02-23 11:12:57 +0000
committerSeigo Tanimura <tanimura@FreeBSD.org>2002-02-23 11:12:57 +0000
commitf591779bb575703cbb6674d324afb4bd212b8cbb (patch)
tree2289c653c0f7aa23498f82b603c33107952652ec /sys/sys/filedesc.h
parent4aaca8854285a47e7fd520d5a2797dbf03d05bec (diff)
downloadsrc-f591779bb575703cbb6674d324afb4bd212b8cbb.tar.gz
src-f591779bb575703cbb6674d324afb4bd212b8cbb.zip
Lock struct pgrp, session and sigio.
New locks are: - pgrpsess_lock which locks the whole pgrps and sessions, - pg_mtx which protects the pgrp members, and - s_mtx which protects the session members. Please refer to sys/proc.h for the coverage of these locks. Changes on the pgrp/session interface: - pgfind() needs the pgrpsess_lock held. - The caller of enterpgrp() is responsible to allocate a new pgrp and session. - Call enterthispgrp() in order to enter an existing pgrp. - pgsignal() requires a pgrp lock held. Reviewed by: jhb, alfred Tested on: cvsup.jp.FreeBSD.org (which is a quad-CPU machine running -current)
Notes
Notes: svn path=/head/; revision=91140
Diffstat (limited to 'sys/sys/filedesc.h')
-rw-r--r--sys/sys/filedesc.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index ae2ea4e30bf6..ef833fbfefda 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -110,17 +110,20 @@ struct filedesc0 {
* on a device or socket. The structure is placed on an SLIST belonging
* to the proc or pgrp so that the entire list may be revoked when the
* process exits or the process group disappears.
+ *
+ * (c) const
+ * (pg) locked by either the process or process group lock
*/
struct sigio {
union {
- struct proc *siu_proc; /* process to receive SIGIO/SIGURG */
- struct pgrp *siu_pgrp; /* process group to receive ... */
+ struct proc *siu_proc; /* (c) process to receive SIGIO/SIGURG */
+ struct pgrp *siu_pgrp; /* (c) process group to receive ... */
} sio_u;
- SLIST_ENTRY(sigio) sio_pgsigio; /* sigio's for process or group */
- struct sigio **sio_myref; /* location of the pointer that holds
- * the reference to this structure */
- struct ucred *sio_ucred; /* current credentials */
- pid_t sio_pgid; /* pgid for signals */
+ SLIST_ENTRY(sigio) sio_pgsigio; /* (pg) sigio's for process or group */
+ struct sigio **sio_myref; /* (c) location of the pointer that holds
+ * the reference to this structure */
+ struct ucred *sio_ucred; /* (c) current credentials */
+ pid_t sio_pgid; /* (c) pgid for signals */
};
#define sio_proc sio_u.siu_proc
#define sio_pgrp sio_u.siu_pgrp