implement prover stdin reading
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user