From a68810a9a43e8c72fb83f351ce083654a1eb8b8e Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 15 Dec 2010 23:09:14 +0000 Subject: [PATCH] Don't use private kernel API. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39857 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/compat/freebsd_network/compat/sys/mutex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/compat/freebsd_network/compat/sys/mutex.h b/src/libs/compat/freebsd_network/compat/sys/mutex.h index 6d0d31977a..444aea6e93 100644 --- a/src/libs/compat/freebsd_network/compat/sys/mutex.h +++ b/src/libs/compat/freebsd_network/compat/sys/mutex.h @@ -44,7 +44,7 @@ mtx_lock(struct mtx* mutex) { if (mutex->type == MTX_DEF) { 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) recursive_lock_lock(&mutex->u.recursive); } @@ -73,12 +73,12 @@ static inline int mtx_owned(struct mtx* mutex) { 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 KDEBUG - return mutex->u.recursive.lock.holder == thread_get_current_thread_id(); + return mutex->u.recursive.lock.holder == find_thread(NULL); #else - return mutex->u.recursive.holder == thread_get_current_thread_id(); + return mutex->u.recursive.holder == find_thread(NULL); #endif }