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

@ -3,15 +3,19 @@
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
typedef struct {
uint8_t *buffer;
size_t head;
size_t tail;
size_t head;
size_t cap;
size_t count;
bool full;
} RBuf;
int32_t rbuf_push(RBuf *rbuf, uint8_t data);
int32_t rbuf_pop(RBuf *rbuf, uint8_t *data);
void rbuf_init(RBuf *rbuf, uint8_t *buf, size_t bufsize);
#endif // RBUF_RBUF_H_