implement prover stdin reading

This commit is contained in:
2025-11-18 17:54:24 +03:00
parent ccf954e1d6
commit 68033325d2
7 changed files with 124 additions and 39 deletions
+7
View File
@@ -3,7 +3,14 @@
#include "../include/utils.h"
#include "../include/stdio.h"
#include <stdbool.h>
#define STDIN_BUFFER_SIZE 4096
extern char stdin_buffer[STDIN_BUFFER_SIZE];
extern int stdin_pos;
extern bool stdin_has_line;
void handle_keyboard();
void init_keyboard();
#endif
+7
View File
@@ -27,6 +27,12 @@ typedef enum TaskState
Terminated
} TaskState;
enum WaitingReason {
NONE,
TIMER,
STDIN,
};
typedef void (*EntryPoint)(void);
// Структура контекста для переключения между процессами
@@ -71,6 +77,7 @@ typedef struct Process
uint32_t kstack_top;
size_t wake_up_time;//wake up time in ticks of the processor, gets set by nanosleep syscall
enum WaitingReason waiting_reason;
} Process;
extern Process* current;