Lines Matching +full:sub +full:- +full:node
1 // SPDX-License-Identifier: GPL-2.0-only
27 struct list_head node; /* on one of subscriber lists */ member
50 list_for_each_entry_safe(cur, p2, &subscriber_array[e], node) { in vmci_event_exit()
58 list_del(&cur->node); in vmci_event_exit()
73 list_for_each_entry(cur, &subscriber_array[e], node) { in event_find()
74 if (cur->id == sub_id) in event_find()
91 subscriber_list = &subscriber_array[event_msg->event_data.event]; in event_deliver()
92 list_for_each_entry_rcu(cur, subscriber_list, node) { in event_deliver()
93 cur->callback(cur->id, &event_msg->event_data, in event_deliver()
94 cur->callback_data); in event_deliver()
107 if (msg->payload_size < sizeof(u32) || in vmci_event_dispatch()
108 msg->payload_size > sizeof(struct vmci_event_data_max)) in vmci_event_dispatch()
111 if (!VMCI_EVENT_VALID(event_msg->event_data.event)) in vmci_event_dispatch()
119 * vmci_event_subscribe() - Subscribe to a given event.
134 struct vmci_subscription *sub; in vmci_event_subscribe() local
150 sub = kzalloc(sizeof(*sub), GFP_KERNEL); in vmci_event_subscribe()
151 if (!sub) in vmci_event_subscribe()
154 sub->id = VMCI_EVENT_MAX; in vmci_event_subscribe()
155 sub->event = event; in vmci_event_subscribe()
156 sub->callback = callback; in vmci_event_subscribe()
157 sub->callback_data = callback_data; in vmci_event_subscribe()
158 INIT_LIST_HEAD(&sub->node); in vmci_event_subscribe()
172 sub->id = subscription_id; in vmci_event_subscribe()
179 list_add_rcu(&sub->node, &subscriber_array[event]); in vmci_event_subscribe()
187 *new_subscription_id = sub->id; in vmci_event_subscribe()
193 * vmci_event_unsubscribe() - unsubscribe from an event.
206 list_del_rcu(&s->node); in vmci_event_unsubscribe()