added IPC syscalls

This commit is contained in:
user
2026-02-24 16:35:11 +01:00
parent 349155a556
commit 18d21a5f70
9 changed files with 171 additions and 3 deletions

View File

@@ -16,12 +16,24 @@
#include "../arch/context.h"
#include "../object/queue.h"
#include "../types.h"
#include "../sync/semaphore.h"
#include "../memory/pagetable.h"
/// Stack size for each thread
constexpr uint32_t STACK_SIZE = 3072;
struct IpcStruct {
uintptr_t ptr;
size_t size;
int pid;
bool is_answer;
IpcStruct* queue_link = nullptr;
};
/*! \brief The Thread is an object used by the scheduler.
* \ingroup thread
*/
@@ -79,6 +91,12 @@ class Thread {
pagetable_t* appcode_table;
pagetable_t* appstack_table;
Semaphore ipc_sem;
Queue<IpcStruct> ipc_queue;
/*! \brief Unique thread id */
const int id;