diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 20:01:24 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 20:01:24 -0800 |
| commit | f1707e2da28f0799cabfef2af47c3af0789cfffa (patch) | |
| tree | e4f13078c6efc2516380fcfd7a38695c41b03823 /include/linux/pipe_fs_i.h | |
| parent | 0d7e0daa8a8fb7f9e2796f7b96374fcb07b152fd (diff) | |
Make pipe buffer handling more generic.
Use a "pipe_buf_operations" structure to describe the ops that
can be done on a pipe buffer, so that pipe buffers from different
sources can have their own rules.
Right now the rules are just about how you map the buffers into
kernel virtual memory space, and how to release them (and whether
you can append new data to the end of an existing buffer).
Diffstat (limited to 'include/linux/pipe_fs_i.h')
| -rw-r--r-- | include/linux/pipe_fs_i.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 62a9de0f51ff..36725e7c02c6 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -7,7 +7,15 @@ struct pipe_buffer { struct page *page; - unsigned short offset, len; + unsigned int offset, len; + struct pipe_buf_operations *ops; +}; + +struct pipe_buf_operations { + int can_merge; + void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *); + void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); + void (*release)(struct pipe_inode_info *, struct pipe_buffer *); }; struct pipe_inode_info { |
