Rewrite ps2kbproc, rbuf (kernel ring buffer) and pipe read/write, Change to -O0 in kernel code
This commit is contained in:
@ -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_
|
||||
|
Reference in New Issue
Block a user