summaryrefslogtreecommitdiff
path: root/include/engine/threads.h
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-08-23 16:37:21 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-08-23 16:37:21 +0530
commit0e107345a54bf987aab0495dbbcf0dcfead131a0 (patch)
tree3b425006d17f4655ab2497f7d1c0476db4ba5f24 /include/engine/threads.h
parent99de764d1d1b936594643e34ae4d2c4a239f69db (diff)
phase F
Diffstat (limited to 'include/engine/threads.h')
-rw-r--r--include/engine/threads.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/engine/threads.h b/include/engine/threads.h
index 43c4459..1e63a5d 100644
--- a/include/engine/threads.h
+++ b/include/engine/threads.h
@@ -56,6 +56,13 @@ struct root_thread_args {
go_args_t *go_args;
engine_message_handler_t *message;
ttable_t *ttable;
+
+ split_point_t *split_points; // shared DTS pool (§2.4)
+ size_t sp_pool_capacity;
+
+ // the root stops its workers when the search completes
+ atomic_int *workers_stop;
+ int workers_count;
};
typedef union {
@@ -87,6 +94,7 @@ void __threads_args_init(
// DTS primitives (§2.3–2.8): split point pool + lock-free move claiming
split_point_t *split_point_alloc(struct threads *handler);
+split_point_t *__pool_alloc(split_point_t *pool, size_t capacity);
void split_point_free(struct threads *handler, split_point_t *split_point);
void split_point_publish(split_point_t *split_point);
bool split_point_claim_move(split_point_t *split_point, move_t *move);