diff options
author | alfred <alfred@FreeBSD.org> | 2002-01-20 22:48:49 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-01-20 22:48:49 +0000 |
commit | 5a34a0d3bb35b4a49c1c17b4ad15e78c968f8564 (patch) | |
tree | 4e0efba165929b475fd7a3617420031ff8ef138b /sys/sys/resourcevar.h | |
parent | b7343f3a64aa97cf9b1d01c289b742ad95c01528 (diff) | |
download | FreeBSD-src-5a34a0d3bb35b4a49c1c17b4ad15e78c968f8564.zip FreeBSD-src-5a34a0d3bb35b4a49c1c17b4ad15e78c968f8564.tar.gz |
use mutex pool mutexes for uidinfo locking.
replace mutex_lock calls on uidinfo with macro calls:
mtx_lock(&uidp->ui_mtx) -> UIDINFO_LOCK(uidp)
Terry Lambert <tlambert2@mindspring.com> helped with this.
Diffstat (limited to 'sys/sys/resourcevar.h')
-rw-r--r-- | sys/sys/resourcevar.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index e414de8..30b4a4b 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -96,9 +96,12 @@ struct uidinfo { long ui_proccnt; /* number of processes */ uid_t ui_uid; /* uid */ u_short ui_ref; /* reference count */ - struct mtx ui_mtx; /* protect all counts/limits */ + struct mtx *ui_mtxp; /* protect all counts/limits */ }; +#define UIDINFO_LOCK(ui) mtx_lock((ui)->ui_mtxp); +#define UIDINFO_UNLOCK(ui) mtx_unlock((ui)->ui_mtxp); + struct thread; struct kse; struct proc; |