Simple IPC with pipes
This commit is contained in:
17
kernel/rbuf/rbuf.h
Normal file
17
kernel/rbuf/rbuf.h
Normal file
@ -0,0 +1,17 @@
|
||||
#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_
|
Reference in New Issue
Block a user