diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2024-11-14 14:46:23 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2024-11-14 14:46:23 -0500 |
| commit | b2548ba4ce295fcd94a50123fb543fac2ef2bc33 (patch) | |
| tree | 444a32abb4a094c4fa2f7bc9a95aa86963ad4110 /src/thread_pool.hpp | |
| parent | b1d926361b9d613ad712ad161f9a8b7ccab4551d (diff) | |
add pk.h and major pkmem refactor
Completely replaces the memory module with pkmem
pkmem is a newer implementation of the same
bucket memory structure.
Also includes replacing pkstr.h with pk.h's pkstr
Diffstat (limited to 'src/thread_pool.hpp')
| -rw-r--r-- | src/thread_pool.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/thread_pool.hpp b/src/thread_pool.hpp index 4eb2fc8..30ee516 100644 --- a/src/thread_pool.hpp +++ b/src/thread_pool.hpp @@ -2,17 +2,17 @@ #define PKE_THREADING_HPP #include "dynamic-array.hpp" -#include "macros.hpp" +#include "vendor/pk.h" #include <cstdint> #include <future> -struct ThreadPoolHandle : public PkeHandle { }; +struct ThreadPoolHandle : public pk_handle { }; -constexpr ThreadPoolHandle ThreadPoolHandle_MAX = ThreadPoolHandle{}; +constexpr ThreadPoolHandle ThreadPoolHandle_MAX = ThreadPoolHandle{ pk_handle_MAX_constexpr }; void PkeThreads_Init(); -ThreadPoolHandle PkeThreads_Init (uint8_t threadCount, uint8_t maxQueueCount, MemBucket *bkt = nullptr); +ThreadPoolHandle PkeThreads_Init (uint8_t threadCount, uint8_t maxQueueCount, struct pk_membucket *bkt = nullptr); void PkeThreads_Reset (ThreadPoolHandle handle); bool PkeThreads_Enqueue (ThreadPoolHandle handle, std::packaged_task<void()> *job); int64_t PkeThreads_GetQueueCount (ThreadPoolHandle handle); |
