toaruos/kernel/include/pipe.h

26 lines
380 B
C
Raw Normal View History

2012-01-25 03:56:35 +04:00
/* vim: tabstop=4 shiftwidth=4 noexpandtab
*
* Pipe
*/
#ifndef PIPE_H
#define PIPE_H
#include <types.h>
2012-01-25 03:58:19 +04:00
typedef struct _pipe_device {
2012-01-25 03:56:35 +04:00
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;
2012-01-25 03:56:35 +04:00
} pipe_device_t;
2012-01-25 04:40:25 +04:00
fs_node_t * make_pipe(size_t size);
2013-03-23 02:11:19 +04:00
int pipe_size(fs_node_t * node);
2012-01-25 03:56:35 +04:00
#endif