summaryrefslogtreecommitdiff
path: root/include/ipc.h
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-07-13 21:58:18 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-07-13 21:58:18 +0530
commitf8c0dc54e36cc201c657aa12e5a22029b092e1bc (patch)
treea0dd1a42c9681be98a7508c128db0dacacefc2e7 /include/ipc.h
parent2e8b78ab0ef01eaacd8094ff839ac93b4451e9c3 (diff)
restructed all the files + uci done now
also broke the symbol analyser in the process, i didn't help much, i had to pull out the pen & paper, but it made a cool graph never the less multithreading was a pain! but it got it in the end fixed the structs naming convention, if it's used outside by other files, it's typedeffed, otherwise it's not fixed the recursive imports issued i had in go_args*, where i was casting it to void* in uci to make it work now response.c doesn't deal with ipc, really happy with that change now every single thing has its own responsibility
Diffstat (limited to 'include/ipc.h')
-rw-r--r--include/ipc.h78
1 files changed, 0 insertions, 78 deletions
diff --git a/include/ipc.h b/include/ipc.h
deleted file mode 100644
index 90a2bcc..0000000
--- a/include/ipc.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef IPC_H
-#define IPC_H
-
-// NOT TRUE IPC: I REALISED I AM STUPID AND COULD HAVE JUST USED THREADS
-
-#include <sys/mman.h>
-#include <stdlib.h>
-
-#include "fen.h"
-#include "uci/state.h"
-
-typedef struct {
- struct uci_move *moves;
- int count;
- int capacity;
-} comm_moves;
-
-struct engine_message {
- int id;
-
- int ready;
-
- int depth;
- int seldepth;
- int multipv;
- int score_cp;
- int nodes;
- int nps;
- int hashfull;
- int tbhits;
- int time;
-
- int mate;
- bool node_limit;
- comm_moves pv;
-
- struct uci_move best_move;
- struct uci_move ponder;
-
- struct engine_message *next;
-};
-
-typedef struct {
- struct engine_message **data;
- int count;
-} engine_messages;
-
-enum { MESSAGE_FILLED, MESSAGE_READ, MESSAGE_PROCESSED };
-typedef struct {
- engine_messages *engine_messages;
- uci_state state;
- int uci_state_initialized;
- int uci_message_ready;
- struct fen_load from_position;
- comm_moves moves;
-} comms;
-
-comm_moves comm_moves_init();
-void add_comm_move(comm_moves *moves, struct uci_move move);
-
-struct go_args {
- comm_moves searchmoves;
- bool ponder;
- int wtime;
- int btime;
- int winc;
- int binc;
- int movestogo;
- int depth;
- int nodes;
- int mate;
- int movetime;
- bool infinite;
- int perft;
-};
-bool should_continue(struct engine_message *message, struct go_args* go);
-
-#endif // IPC_H