Lines Matching refs:ev
44 static void handle_channel(const uevent_t* ev, void* self);
45 static void handle_port(const uevent_t* ev, void* self);
59 static inline void handle_port_errors(const uevent_t* ev) { in handle_port_errors() argument
60 if ((ev->event & IPC_HANDLE_POLL_ERROR) || in handle_port_errors()
61 (ev->event & IPC_HANDLE_POLL_HUP) || in handle_port_errors()
62 (ev->event & IPC_HANDLE_POLL_MSG) || in handle_port_errors()
63 (ev->event & IPC_HANDLE_POLL_SEND_UNBLOCKED)) { in handle_port_errors()
65 TLOGE("error event (0x%x) for port (%d)\n", ev->event, ev->handle); in handle_port_errors()
70 static inline void handle_chan_errors(const uevent_t* ev) { in handle_chan_errors() argument
71 if ((ev->event & IPC_HANDLE_POLL_ERROR) || in handle_chan_errors()
72 (ev->event & IPC_HANDLE_POLL_READY)) { in handle_chan_errors()
73 TLOGE("error event (0x%x) for chan (%d)\n", ev->event, ev->handle); in handle_chan_errors()
86 static int do_connect(struct ipc_port_context* ctx, const uevent_t* ev) { in do_connect() argument
93 if (ev->event & IPC_HANDLE_POLL_READY) { in do_connect()
96 rc = accept(ev->handle, &peer_uuid); in do_connect()
98 TLOGE("failed (%d) to accept on port %d\n", rc, ev->handle); in do_connect()
136 static int do_handle_msg(struct ipc_channel_context* ctx, const uevent_t* ev) { in do_handle_msg() argument
137 handle_t chan = ev->handle; in do_handle_msg()
187 const uevent_t* ev) { in do_disconnect() argument
189 tipc_hset_remove_entry(context->common.hset, ev->handle); in do_disconnect()
191 close(ev->handle); in do_disconnect()
194 static void handle_port(const struct uevent* ev, void* self) { in handle_port() argument
198 handle_port_errors(ev); in handle_port()
200 do_connect(port_ctx, ev); in handle_port()
203 static void handle_channel(const struct uevent* ev, void* self) { in handle_channel() argument
207 handle_chan_errors(ev); in handle_channel()
209 if (ev->event & IPC_HANDLE_POLL_MSG) { in handle_channel()
211 int rc = do_handle_msg(channel_ctx, ev); in handle_channel()
216 do_disconnect(channel_ctx, ev); in handle_channel()
221 ev->handle); in handle_channel()
222 do_disconnect(channel_ctx, ev); in handle_channel()
227 if (ev->event & IPC_HANDLE_POLL_HUP) { in handle_channel()
228 do_disconnect(channel_ctx, ev); in handle_channel()
283 struct uevent ev = UEVENT_INITIAL_VALUE(ev); in wait_to_send() local
285 rc = wait(session, &ev, INFINITE_TIME); in wait_to_send()
291 if (ev.event & IPC_HANDLE_POLL_SEND_UNBLOCKED) { in wait_to_send()
295 if (ev.event & IPC_HANDLE_POLL_MSG) { in wait_to_send()
299 if (ev.event & IPC_HANDLE_POLL_HUP) { in wait_to_send()