diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/kern/kern_sx.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/kern/kern_sx.c')
-rw-r--r-- | sys/kern/kern_sx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index e1d1ce6..df18c1e 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -95,7 +95,7 @@ _sx_slock(struct sx *sx, const char *file, int line) { mtx_lock(&sx->sx_lock); - KASSERT(sx->sx_xholder != curproc, + KASSERT(sx->sx_xholder != curthread, ("%s (%s): slock while xlock is held @ %s:%d\n", __FUNCTION__, sx->sx_object.lo_name, file, line)); @@ -148,7 +148,7 @@ _sx_xlock(struct sx *sx, const char *file, int line) * xlock while in here, we consider it API abuse and put it under * INVARIANTS. */ - KASSERT(sx->sx_xholder != curproc, + KASSERT(sx->sx_xholder != curthread, ("%s (%s): xlock already held @ %s:%d", __FUNCTION__, sx->sx_object.lo_name, file, line)); @@ -163,7 +163,7 @@ _sx_xlock(struct sx *sx, const char *file, int line) /* Acquire an exclusive lock. */ sx->sx_cnt--; - sx->sx_xholder = curproc; + sx->sx_xholder = curthread; LOCK_LOG_LOCK("XLOCK", &sx->sx_object, 0, 0, file, line); WITNESS_LOCK(&sx->sx_object, LOP_EXCLUSIVE, file, line); @@ -178,7 +178,7 @@ _sx_try_xlock(struct sx *sx, const char *file, int line) mtx_lock(&sx->sx_lock); if (sx->sx_cnt == 0) { sx->sx_cnt--; - sx->sx_xholder = curproc; + sx->sx_xholder = curthread; LOCK_LOG_TRY("XLOCK", &sx->sx_object, 0, 1, file, line); WITNESS_LOCK(&sx->sx_object, LOP_EXCLUSIVE | LOP_TRYLOCK, file, line); @@ -256,7 +256,7 @@ _sx_try_upgrade(struct sx *sx, const char *file, int line) if (sx->sx_cnt == 1) { sx->sx_cnt = -1; - sx->sx_xholder = curproc; + sx->sx_xholder = curthread; LOCK_LOG_TRY("XUPGRADE", &sx->sx_object, 0, 1, file, line); WITNESS_UPGRADE(&sx->sx_object, LOP_EXCLUSIVE | LOP_TRYLOCK, |