Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kLock.h
Go to the documentation of this file.
1 
10 #ifndef K_API_LOCK_H
11 #define K_API_LOCK_H
12 
13 #include <kApi/kApiDef.h>
14 #include <kApi/Threads/kLock.x.h>
15 
38 kFx(kStatus) kLock_Construct(kLock* lock, kAlloc allocator);
39 
52 kFx(kStatus) kLock_ConstructEx(kLock* lock, kBool isWaitable, kAlloc allocator);
53 
65 kFx(kStatus) kLock_Enter(kLock lock);
66 
82 kFx(kStatus) kLock_EnterEx(kLock lock, k64u timeout);
83 
95 kFx(kStatus) kLock_Exit(kLock lock);
96 
97 #endif
kStatus kLock_ConstructEx(kLock *lock, kBool isWaitable, kAlloc allocator)
Constructs a lock object with optional support for waiting.
kStatus kLock_EnterEx(kLock lock, k64u timeout)
Blocks until exclusive ownership of the lock is acquired or the timeout interval has elapsed...
Represents a 64-bit unsigned integer.
kStatus kLock_Enter(kLock lock)
Blocks until exclusive ownership of the lock is acquired.
Abstract base class for memory allocator types.
Represents a recursive, mutual exclusion lock.
Core Zen type declarations.
kStatus kLock_Exit(kLock lock)
Relinquishes ownership of the lock.
Represents an error code.
Represents a boolean value.
kStatus kLock_Construct(kLock *lock, kAlloc allocator)
Constructs a lock object.