diff options
Diffstat (limited to 'include/linux/connector.h')
-rw-r--r-- | include/linux/connector.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/include/linux/connector.h b/include/linux/connector.h index 96de26301f84..95952cc1f525 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -104,12 +104,19 @@ struct cn_queue_dev { | |||
104 | struct sock *nls; | 104 | struct sock *nls; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | struct cn_callback { | 107 | struct cn_callback_id { |
108 | unsigned char name[CN_CBQ_NAMELEN]; | 108 | unsigned char name[CN_CBQ_NAMELEN]; |
109 | |||
110 | struct cb_id id; | 109 | struct cb_id id; |
110 | }; | ||
111 | |||
112 | struct cn_callback_data { | ||
113 | void (*destruct_data) (void *); | ||
114 | void *ddata; | ||
115 | |||
116 | void *callback_priv; | ||
111 | void (*callback) (void *); | 117 | void (*callback) (void *); |
112 | void *priv; | 118 | |
119 | void *free; | ||
113 | }; | 120 | }; |
114 | 121 | ||
115 | struct cn_callback_entry { | 122 | struct cn_callback_entry { |
@@ -118,8 +125,8 @@ struct cn_callback_entry { | |||
118 | struct work_struct work; | 125 | struct work_struct work; |
119 | struct cn_queue_dev *pdev; | 126 | struct cn_queue_dev *pdev; |
120 | 127 | ||
121 | void (*destruct_data) (void *); | 128 | struct cn_callback_id id; |
122 | void *ddata; | 129 | struct cn_callback_data data; |
123 | 130 | ||
124 | int seq, group; | 131 | int seq, group; |
125 | struct sock *nls; | 132 | struct sock *nls; |
@@ -142,9 +149,9 @@ struct cn_dev { | |||
142 | 149 | ||
143 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | 150 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); |
144 | void cn_del_callback(struct cb_id *); | 151 | void cn_del_callback(struct cb_id *); |
145 | int cn_netlink_send(struct cn_msg *, u32, int); | 152 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); |
146 | 153 | ||
147 | int cn_queue_add_callback(struct cn_queue_dev *dev, struct cn_callback *cb); | 154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
148 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
149 | 156 | ||
150 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); | 157 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); |
@@ -152,6 +159,8 @@ void cn_queue_free_dev(struct cn_queue_dev *dev); | |||
152 | 159 | ||
153 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 160 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
154 | 161 | ||
162 | void cn_queue_wrapper(void *data); | ||
163 | |||
155 | extern int cn_already_initialized; | 164 | extern int cn_already_initialized; |
156 | 165 | ||
157 | #endif /* __KERNEL__ */ | 166 | #endif /* __KERNEL__ */ |