Changes for kernel land (added set_sem_owner and kernel_cpp.h/cpp).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5161 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Waldemar Kornewald 2003-10-25 13:24:59 +00:00
parent a10a3d49d6
commit cdc2ad89b1

View File

@ -1,5 +1,5 @@
//
// $Id: Locker.cpp,v 1.1 2003/06/10 22:29:51 bonefish Exp $
// $Id: Locker.cpp,v 1.2 2003/10/25 13:24:59 wkornew Exp $
//
// This file contains the OpenBeOS implementation of BLocker.
//
@ -9,6 +9,10 @@
#include <OS.h>
#include <SupportDefs.h>
#ifdef _KERNEL_MODE
#include <kernel_cpp.h>
#endif
#ifdef USE_OPENBEOS_NAMESPACE
namespace OpenBeOS {
@ -209,6 +213,10 @@ BLocker::InitLocker(const char *name,
fSemaphoreID = create_sem(1, name);
}
#ifdef _KERNEL_MODE
set_sem_owner(fSemaphoreID, B_SYSTEM_TEAM);
#endif
// The lock is currently not acquired so there is no owner.
fLockOwner = B_ERROR;