1 /**************************************************************************** 2 **************************************************************************** 3 *** 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. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _LINUX_RELAY_H 20 #define _LINUX_RELAY_H 21 #include <linux/types.h> 22 #include <linux/sched.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #include <linux/wait.h> 25 #include <linux/list.h> 26 #include <linux/fs.h> 27 #include <linux/poll.h> 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #include <linux/kref.h> 30 #define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) 31 #define RELAYFS_CHANNEL_VERSION 6 32 struct rchan_buf 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 { 35 void *start; 36 void *data; 37 size_t offset; 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 size_t subbufs_produced; 40 size_t subbufs_consumed; 41 struct rchan *chan; 42 wait_queue_head_t read_wait; 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 struct work_struct wake_readers; 45 struct dentry *dentry; 46 struct kref kref; 47 struct page **page_array; 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 unsigned int page_count; 50 unsigned int finalized; 51 size_t *padding; 52 size_t prev_padding; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 size_t bytes_consumed; 55 unsigned int cpu; 56 } ____cacheline_aligned; 57 struct rchan 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 { 60 u32 version; 61 size_t subbuf_size; 62 size_t n_subbufs; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 size_t alloc_size; 65 struct rchan_callbacks *cb; 66 struct kref kref; 67 void *private_data; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 size_t last_toobig; 70 struct rchan_buf *buf[NR_CPUS]; 71 }; 72 struct rchan_callbacks 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 { 75 int (*subbuf_start) (struct rchan_buf *buf, 76 void *subbuf, 77 void *prev_subbuf, 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 size_t prev_padding); 80 void (*buf_mapped)(struct rchan_buf *buf, 81 struct file *filp); 82 void (*buf_unmapped)(struct rchan_buf *buf, 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 struct file *filp); 85 struct dentry *(*create_buf_file)(const char *filename, 86 struct dentry *parent, 87 int mode, 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 struct rchan_buf *buf, 90 int *is_global); 91 int (*remove_buf_file)(struct dentry *dentry); 92 }; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 struct rchan *relay_open(const char *base_filename, 95 struct dentry *parent, 96 size_t subbuf_size, 97 size_t n_subbufs, 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 struct rchan_callbacks *cb); 100 #endif 101