Don't use private kernel API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39857 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -44,7 +44,7 @@ mtx_lock(struct mtx* mutex)
|
|||||||
{
|
{
|
||||||
if (mutex->type == MTX_DEF) {
|
if (mutex->type == MTX_DEF) {
|
||||||
mutex_lock(&mutex->u.mutex.lock);
|
mutex_lock(&mutex->u.mutex.lock);
|
||||||
mutex->u.mutex.owner = thread_get_current_thread_id();
|
mutex->u.mutex.owner = find_thread(NULL);
|
||||||
} else if (mutex->type == MTX_RECURSE)
|
} else if (mutex->type == MTX_RECURSE)
|
||||||
recursive_lock_lock(&mutex->u.recursive);
|
recursive_lock_lock(&mutex->u.recursive);
|
||||||
}
|
}
|
||||||
@@ -73,12 +73,12 @@ static inline int
|
|||||||
mtx_owned(struct mtx* mutex)
|
mtx_owned(struct mtx* mutex)
|
||||||
{
|
{
|
||||||
if (mutex->type == MTX_DEF)
|
if (mutex->type == MTX_DEF)
|
||||||
return mutex->u.mutex.owner == thread_get_current_thread_id();
|
return mutex->u.mutex.owner == find_thread(NULL);
|
||||||
if (mutex->type == MTX_RECURSE) {
|
if (mutex->type == MTX_RECURSE) {
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
return mutex->u.recursive.lock.holder == thread_get_current_thread_id();
|
return mutex->u.recursive.lock.holder == find_thread(NULL);
|
||||||
#else
|
#else
|
||||||
return mutex->u.recursive.holder == thread_get_current_thread_id();
|
return mutex->u.recursive.holder == find_thread(NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user