mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
feat: Massive OS expansion with IPC, Sound & TTS, Block layer, FAT32/ext2/sysfs, Signals, Syscalls, Modules, Drivers & 50+ LazyBox applets
This commit is contained in:
1 parent
5662be29f5
commit
d680335f05
64 files changed
+2370
-166
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#ifndef _IPC_PIPE_H
|
||||
#define _IPC_PIPE_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
#define PIPE_BUF_SIZE 4096
|
||||
|
||||
typedef struct pipe {
|
||||
uint8_t buffer[PIPE_BUF_SIZE];
|
||||
uint32_t head;
|
||||
uint32_t tail;
|
||||
uint32_t count;
|
||||
bool read_open;
|
||||
bool write_open;
|
||||
vfs_node_t* read_node;
|
||||
vfs_node_t* write_node;
|
||||
} pipe_t;
|
||||
|
||||
int pipe_create(int pipefd[2]);
|
||||
ssize_t pipe_read(pipe_t* p, void* buf, size_t count);
|
||||
ssize_t pipe_write(pipe_t* p, const void* buf, size_t count);
|
||||
void pipe_close_read(pipe_t* p);
|
||||
void pipe_close_write(pipe_t* p);
|
||||
|
||||
#endif // _IPC_PIPE_H
|
||||
Reference in new issue
Block a user