diff options
Diffstat (limited to 'src/ipc.h')
| -rw-r--r-- | src/ipc.h | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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 <stdlib.h> #include <sys/mman.h> #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; |
