From 965bf81879b22a25fd9b0d17ce6defd3d51c6173 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Tue, 7 Jul 2026 14:30:21 +0530 Subject: engine can now send updates to uci --- src/ipc.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/ipc.h') diff --git a/src/ipc.h b/src/ipc.h index 98ce6d3..1c901b8 100644 --- a/src/ipc.h +++ b/src/ipc.h @@ -1,14 +1,14 @@ #ifndef IPC_H #define IPC_H +// NOT TRUE IPC: I REALISED I AM STUPID AND COULD HAVE JUST USED THREADS + #include #include #include "fen.h" #include "uci/state.h" -void* create_shared_memory(size_t size); - typedef struct { struct uci_move *moves; int count; @@ -16,6 +16,8 @@ typedef struct { } comm_moves; struct engine_message { + int ready; + int depth; int seldepth; int multipv; @@ -30,9 +32,16 @@ struct engine_message { struct engine_message *next; }; +typedef struct { + struct engine_message **data; + int count; +} engine_messages; + enum { MESSAGE_FILLED, MESSAGE_READ, MESSAGE_PROCESSED }; typedef struct { - struct engine_message engine_message; + engine_messages *engine_messages; + + uci_state state; int uci_message_ready; struct fen_load from_position; -- cgit v1.2.3