Files
my-os-project2/kernel/rbuf/rbuf.h
2025-09-06 11:47:01 +02:00

18 lines
287 B
C

#ifndef RBUF_RBUF_H_
#define RBUF_RBUF_H_
#include <stdint.h>
#include <stddef.h>
typedef struct {
uint8_t *buffer;
size_t head;
size_t tail;
size_t cap;
} RBuf;
int32_t rbuf_push(RBuf *rbuf, uint8_t data);
int32_t rbuf_pop(RBuf *rbuf, uint8_t *data);
#endif // RBUF_RBUF_H_