26 lines
380 B
C
26 lines
380 B
C
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
*
|
|
* Pipe
|
|
*/
|
|
|
|
#ifndef PIPE_H
|
|
#define PIPE_H
|
|
|
|
#include <types.h>
|
|
|
|
typedef struct _pipe_device {
|
|
uint8_t * buffer;
|
|
size_t write_ptr;
|
|
size_t read_ptr;
|
|
size_t size;
|
|
size_t refcount;
|
|
uint8_t volatile lock;
|
|
list_t * wait_queue;
|
|
int dead;
|
|
} pipe_device_t;
|
|
|
|
fs_node_t * make_pipe(size_t size);
|
|
int pipe_size(fs_node_t * node);
|
|
|
|
#endif
|