version 1.26, 2007/12/06 01:18:46 |
version 1.27, 2007/12/24 14:57:56 |
Line 254 __strong_alias(mutex_spin_exit,mutex_vec |
|
Line 254 __strong_alias(mutex_spin_exit,mutex_vec |
|
void mutex_abort(kmutex_t *, const char *, const char *); |
void mutex_abort(kmutex_t *, const char *, const char *); |
void mutex_dump(volatile void *); |
void mutex_dump(volatile void *); |
int mutex_onproc(uintptr_t, struct cpu_info **); |
int mutex_onproc(uintptr_t, struct cpu_info **); |
static struct lwp *mutex_owner(wchan_t); |
|
|
|
lockops_t mutex_spin_lockops = { |
lockops_t mutex_spin_lockops = { |
"Mutex", |
"Mutex", |
Line 273 syncobj_t mutex_syncobj = { |
|
Line 272 syncobj_t mutex_syncobj = { |
|
turnstile_unsleep, |
turnstile_unsleep, |
turnstile_changepri, |
turnstile_changepri, |
sleepq_lendpri, |
sleepq_lendpri, |
mutex_owner, |
(void *)mutex_owner, |
}; |
}; |
|
|
/* |
/* |
Line 816 mutex_owned(kmutex_t *mtx) |
|
Line 815 mutex_owned(kmutex_t *mtx) |
|
* Return the current owner of an adaptive mutex. Used for |
* Return the current owner of an adaptive mutex. Used for |
* priority inheritance. |
* priority inheritance. |
*/ |
*/ |
static struct lwp * |
lwp_t * |
mutex_owner(wchan_t obj) |
mutex_owner(kmutex_t *mtx) |
{ |
{ |
kmutex_t *mtx = (void *)(uintptr_t)obj; /* discard qualifiers */ |
|
|
|
MUTEX_ASSERT(mtx, MUTEX_ADAPTIVE_P(mtx)); |
MUTEX_ASSERT(mtx, MUTEX_ADAPTIVE_P(mtx)); |
return (struct lwp *)MUTEX_OWNER(mtx->mtx_owner); |
return (struct lwp *)MUTEX_OWNER(mtx->mtx_owner); |