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;
|
2012-02-01 05:27:38 +04:00
|
|
|
list_t * wait_queue;
|
2013-08-20 06:38:15 +04:00
|
|
|
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
|