1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_RELAY_H
13 #define _LINUX_RELAY_H
15 #include <linux/types.h>
16 #include <linux/sched.h>
17 #include <linux/wait.h>
18 #include <linux/list.h>
20 #include <linux/poll.h>
21 #include <linux/kref.h>
23 #define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE)
25 #define RELAYFS_CHANNEL_VERSION 6
32 size_t subbufs_produced
;
33 size_t subbufs_consumed
;
35 wait_queue_head_t read_wait
;
36 struct work_struct wake_readers
;
37 struct dentry
*dentry
;
39 struct page
**page_array
;
40 unsigned int page_count
;
41 unsigned int finalized
;
44 size_t bytes_consumed
;
46 } ____cacheline_aligned
;
54 struct rchan_callbacks
*cb
;
58 struct rchan_buf
*buf
[NR_CPUS
];
61 struct rchan_callbacks
64 int (*subbuf_start
) (struct rchan_buf
*buf
,
69 void (*buf_mapped
)(struct rchan_buf
*buf
,
72 void (*buf_unmapped
)(struct rchan_buf
*buf
,
75 struct dentry
*(*create_buf_file
)(const char *filename
,
76 struct dentry
*parent
,
78 struct rchan_buf
*buf
,
81 int (*remove_buf_file
)(struct dentry
*dentry
);
84 struct rchan
*relay_open(const char *base_filename
,
85 struct dentry
*parent
,
88 struct rchan_callbacks
*cb
);