mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
Kernel V3.0.0
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "gui_ipc.h"
|
||||
|
||||
#define MAX_GUI_EVENTS 32
|
||||
|
||||
// Registers saved on the stack by interrupts/exceptions
|
||||
typedef struct {
|
||||
@@ -18,13 +21,23 @@ typedef struct process {
|
||||
uint64_t pml4_phys; // Physical address of the page table
|
||||
uint64_t kernel_stack; // Ring 0 stack pointer for user mode switches
|
||||
bool is_user;
|
||||
|
||||
gui_event_t gui_events[MAX_GUI_EVENTS];
|
||||
int gui_event_head;
|
||||
int gui_event_tail;
|
||||
void *ui_window; // Pointer to the active Window
|
||||
|
||||
struct process *next;
|
||||
} process_t;
|
||||
|
||||
void process_init(void);
|
||||
void process_create(void* entry_point, bool is_user);
|
||||
void process_create_elf(const char* filepath);
|
||||
process_t* process_get_current(void);
|
||||
uint64_t process_schedule(uint64_t current_rsp);
|
||||
uint64_t process_terminate_current(void);
|
||||
|
||||
void process_push_gui_event(process_t *proc, gui_event_t *ev);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user