Rewrite ps2kbproc, rbuf (kernel ring buffer) and pipe read/write, Change to -O0 in kernel code

This commit is contained in:
2025-09-20 16:50:40 +02:00
parent 222e846881
commit 0c65bd9891
8 changed files with 39 additions and 33 deletions

View File

@ -9,14 +9,13 @@
Proc *PS2KBPROC = NULL;
Ps2KbFastBuf PS2KB_BUF;
void ps2kbproc_init(Proc *proc) {
PS2KBPROC = proc;
PS2KBPROC->bcast_pipes.list = NULL;
PS2KB_BUF.rbuf.buffer = dlmalloc(IPC_PIPE_MAX);
PS2KB_BUF.rbuf.cap = IPC_PIPE_MAX;
uint8_t *buf = dlmalloc(IPC_PIPE_MAX);
rbuf_init(&PS2KB_BUF.rbuf, buf, IPC_PIPE_MAX);
spinlock_init(&PS2KB_BUF.spinlock);
}

View File

@ -1,6 +1,7 @@
#ifndef PROC_PS2KB_PS2KBPROC_H_
#define PROC_PS2KB_PS2KBPROC_H_
#include <stdbool.h>
#include "proc/proc.h"
#include "rbuf/rbuf.h"
#include "spinlock/spinlock.h"