Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kThreadPool.h
Go to the documentation of this file.
1
10 #ifndef K_API_THREADPOOL_H
11 #define K_API_THREADPOOL_H
12
13 #include <kApi/kApiDef.h>
14 #include <kApi/Threads/kThread.h>
15 #include <kApi/Threads/kThreadPool.x.h>
16
27 //typedef kObject kThreadPool; --forward-declared in kFsDef.x.h
28
34 typedef kPointer kThreadPoolTransaction;
35
45 kFx(kStatus) kThreadPool_Construct(kThreadPool* pool, kSize threadCount, kAlloc allocator);
46
56 kFx(kSize) kThreadPool_Count(kThreadPool pool);
57
74 kFx(kStatus) kThreadPool_BeginExecute(kThreadPool pool, kThreadFx entryFx, kPointer context, kThreadPoolTransaction* transaction);
75
91 kFx(kStatus) kThreadPool_EndExecute(kThreadPool pool, kThreadPoolTransaction transaction, k64u timeout, kStatus* status);
92
108 kFx(kThreadPool) kThreadPool_Default();
109
110 #endif
k64u
Represents a 64-bit unsigned integer.
kPointer
Represents a void pointer.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kThreadPool::kThreadPool_Default
kThreadPool kThreadPool_Default()
Returns the default thread pool.
kThreadPoolTransaction
Opaque pointer to a kThreadPool transaction.
kThreadPool::kThreadPool_Count
kSize kThreadPool_Count(kThreadPool pool)
Returns the number of threads in the pool.
kApiDef.h
Core Zen type declarations.
kThreadPool::kThreadPool_Construct
kStatus kThreadPool_Construct(kThreadPool *pool, kSize threadCount, kAlloc allocator)
Constructs a kThreadPool object.
kThreadPool
Represents a thread pool.
kThreadFx
kStatus(kCall * kThreadFx)(kPointer context)
Thread entry-point signature; used by kThread_Start.
Definition: kThread.h:16
kThread.h
Declares the kThread class.
kStatus
Represents an error code.
kThreadPool::kThreadPool_BeginExecute
kStatus kThreadPool_BeginExecute(kThreadPool pool, kThreadFx entryFx, kPointer context, kThreadPoolTransaction *transaction)
Schedules the specified callback for execution on the thread pool.
kThreadPool::kThreadPool_EndExecute
kStatus kThreadPool_EndExecute(kThreadPool pool, kThreadPoolTransaction transaction, k64u timeout, kStatus *status)
Blocks until execution of a thread pool transaction is complete.