aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/connector.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-05-24 03:06:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-05-24 03:06:26 -0400
commitb73077eb03f510a84b102fb97640e595a958403c (patch)
tree8b639000418e2756bf6baece4e00e07d2534bccc /include/linux/connector.h
parent28350e330cfab46b60a1dbf763b678d859f9f3d9 (diff)
parent9d2e173644bb5c42ff1b280fbdda3f195a7cf1f7 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/connector.h')
-rw-r--r--include/linux/connector.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 7e8ca75d2dad..7c60d0942adb 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -42,8 +42,9 @@
42#define CN_VAL_DM_USERSPACE_LOG 0x1 42#define CN_VAL_DM_USERSPACE_LOG 0x1
43#define CN_IDX_DRBD 0x8 43#define CN_IDX_DRBD 0x8
44#define CN_VAL_DRBD 0x1 44#define CN_VAL_DRBD 0x1
45#define CN_KVP_IDX 0x9 /* HyperV KVP */
45 46
46#define CN_NETLINK_USERS 8 47#define CN_NETLINK_USERS 9
47 48
48/* 49/*
49 * Maximum connector's message size. 50 * Maximum connector's message size.
@@ -87,8 +88,6 @@ struct cn_queue_dev {
87 atomic_t refcnt; 88 atomic_t refcnt;
88 unsigned char name[CN_CBQ_NAMELEN]; 89 unsigned char name[CN_CBQ_NAMELEN];
89 90
90 struct workqueue_struct *cn_queue;
91
92 struct list_head queue_list; 91 struct list_head queue_list;
93 spinlock_t queue_lock; 92 spinlock_t queue_lock;
94 93
@@ -100,20 +99,13 @@ struct cn_callback_id {
100 struct cb_id id; 99 struct cb_id id;
101}; 100};
102 101
103struct cn_callback_data {
104 struct sk_buff *skb;
105 void (*callback) (struct cn_msg *, struct netlink_skb_parms *);
106
107 void *free;
108};
109
110struct cn_callback_entry { 102struct cn_callback_entry {
111 struct list_head callback_entry; 103 struct list_head callback_entry;
112 struct work_struct work; 104 atomic_t refcnt;
113 struct cn_queue_dev *pdev; 105 struct cn_queue_dev *pdev;
114 106
115 struct cn_callback_id id; 107 struct cn_callback_id id;
116 struct cn_callback_data data; 108 void (*callback) (struct cn_msg *, struct netlink_skb_parms *);
117 109
118 u32 seq, group; 110 u32 seq, group;
119}; 111};
@@ -128,19 +120,21 @@ struct cn_dev {
128 struct cn_queue_dev *cbdev; 120 struct cn_queue_dev *cbdev;
129}; 121};
130 122
131int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); 123int cn_add_callback(struct cb_id *id, const char *name,
124 void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
132void cn_del_callback(struct cb_id *); 125void cn_del_callback(struct cb_id *);
133int cn_netlink_send(struct cn_msg *, u32, gfp_t); 126int cn_netlink_send(struct cn_msg *, u32, gfp_t);
134 127
135int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); 128int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
129 struct cb_id *id,
130 void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
136void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); 131void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
132void cn_queue_release_callback(struct cn_callback_entry *);
137 133
138struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); 134struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *);
139void cn_queue_free_dev(struct cn_queue_dev *dev); 135void cn_queue_free_dev(struct cn_queue_dev *dev);
140 136
141int cn_cb_equal(struct cb_id *, struct cb_id *); 137int cn_cb_equal(struct cb_id *, struct cb_id *);
142 138
143void cn_queue_wrapper(struct work_struct *work);
144
145#endif /* __KERNEL__ */ 139#endif /* __KERNEL__ */
146#endif /* __CONNECTOR_H */ 140#endif /* __CONNECTOR_H */