From bda976c6ec14cb0b447b66084e596bf9efe0c10d Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Thu, 26 Sep 2024 15:41:50 -0700 Subject: [PATCH] Fix naming --- source/qnx/ionotify_event_loop.c | 209 ++++++++++++++++--------------- 1 file changed, 105 insertions(+), 104 deletions(-) diff --git a/source/qnx/ionotify_event_loop.c b/source/qnx/ionotify_event_loop.c index 4e784363e..dd61edea3 100644 --- a/source/qnx/ionotify_event_loop.c +++ b/source/qnx/ionotify_event_loop.c @@ -89,7 +89,7 @@ struct aws_ionotify_event_loop { }; /* Data associated with a subscribed I/O handle. */ -struct aws_ionotify_event_data { +struct aws_ionotify_handle_data { struct aws_allocator *alloc; struct aws_io_handle *handle; struct aws_event_loop *event_loop; @@ -420,11 +420,11 @@ static void s_cancel_task(struct aws_event_loop *event_loop, struct aws_task *ta aws_task_scheduler_cancel_task(&ionotify_event_loop->scheduler, task); } -/* Map ionotify_event_data to internal ID. */ +/* Map ionotify_handle_data to internal ID. */ static int s_add_handle( struct aws_ionotify_event_loop *ionotify_event_loop, - struct aws_ionotify_event_data *ionotify_event_data) { - AWS_FATAL_ASSERT(s_is_on_callers_thread(ionotify_event_data->event_loop)); + struct aws_ionotify_handle_data *ionotify_handle_data) { + AWS_FATAL_ASSERT(s_is_on_callers_thread(ionotify_handle_data->event_loop)); /* Special constant, _NOTIFY_DATA_MASK, limits the maximum value that can be used as user data in I/O events. */ int max_handle_id = _NOTIFY_DATA_MASK; @@ -433,7 +433,7 @@ static int s_add_handle( AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p: Maximum number of registered handles reached", - (void *)ionotify_event_data->event_loop); + (void *)ionotify_handle_data->event_loop); return AWS_OP_ERR; } @@ -452,26 +452,26 @@ static int s_add_handle( } } while (elem == NULL); - ionotify_event_data->handle_id = next_handle_id; + ionotify_handle_data->handle_id = next_handle_id; ionotify_event_loop->last_handle_id = next_handle_id; - elem->value = ionotify_event_data; + elem->value = ionotify_handle_data; return AWS_OP_SUCCESS; } -struct aws_ionotify_event_data *s_find_handle( +struct aws_ionotify_handle_data *s_find_handle( struct aws_event_loop *event_loop, struct aws_ionotify_event_loop *ionotify_event_loop, int handle_id) { AWS_FATAL_ASSERT(s_is_on_callers_thread(event_loop)); (void)event_loop; - struct aws_ionotify_event_data *ionotify_event_data = NULL; + struct aws_ionotify_handle_data *ionotify_handle_data = NULL; struct aws_hash_element *elem = NULL; aws_hash_table_find(&ionotify_event_loop->handles, (void *)handle_id, &elem); if (elem != NULL) { - ionotify_event_data = elem->value; + ionotify_handle_data = elem->value; } - return ionotify_event_data; + return ionotify_handle_data; } static void s_remove_handle( @@ -492,45 +492,45 @@ static void s_subscribe_task(struct aws_task *task, void *user_data, enum aws_ta return; } - struct aws_ionotify_event_data *ionotify_event_data = user_data; - struct aws_event_loop *event_loop = ionotify_event_data->event_loop; + struct aws_ionotify_handle_data *ionotify_handle_data = user_data; + struct aws_event_loop *event_loop = ionotify_handle_data->event_loop; struct aws_ionotify_event_loop *ionotify_event_loop = event_loop->impl_data; AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Subscribing to events, event mask is %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, - ionotify_event_data->events_subscribed); + ionotify_handle_data->handle->data.fd, + ionotify_handle_data->events_subscribed); - /* Map ionotify_event_data to ID. This ID will be returned with the I/O events from ionotify. */ - if (ionotify_event_data->handle_id == 0) { - s_add_handle(ionotify_event_loop, ionotify_event_data); + /* Map ionotify_handle_data to ID. This ID will be returned with the I/O events from ionotify. */ + if (ionotify_handle_data->handle_id == 0) { + s_add_handle(ionotify_event_loop, ionotify_handle_data); AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Mapped fd to handle ID %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, - ionotify_event_data->handle_id); + ionotify_handle_data->handle->data.fd, + ionotify_handle_data->handle_id); /* I/O events from ionotify will be delivered as pulses with a user-defined 28-bit ID. * SIGEV_PULSE_PRIO_INHERIT means the thread that receives the pulse will run at the initial priority of the * process. */ short pulse_priority = SIGEV_PULSE_PRIO_INHERIT; short pulse_sigev_code = IO_EVENT_PULSE_SIGEV_CODE; SIGEV_PULSE_INT_INIT( - &ionotify_event_data->event, - ionotify_event_data->pulse_connection_id, + &ionotify_handle_data->event, + ionotify_handle_data->pulse_connection_id, pulse_priority, pulse_sigev_code, - ionotify_event_data->handle_id); + ionotify_handle_data->handle_id); /* From the iomgr.h header: * If extended conditions are requested, and they need to be returned in an armed event, the negative of the * satisfied conditions are returned in (io_notify_t).i.event.sigev_code. * Extended conditions are the ones starting with _NOTIFY_CONDE_. * For that feature to work, special bits in the event structure must be set. */ - ionotify_event_data->event.sigev_notify |= SIGEV_FLAG_CODE_UPDATEABLE; - SIGEV_MAKE_UPDATEABLE(&ionotify_event_data->event); + ionotify_handle_data->event.sigev_notify |= SIGEV_FLAG_CODE_UPDATEABLE; + SIGEV_MAKE_UPDATEABLE(&ionotify_handle_data->event); /* The application must register the event by calling MsgRegisterEvent() with the fd processed in ionotify(). * See: @@ -540,78 +540,78 @@ static void s_subscribe_task(struct aws_task *task, void *user_data, enum aws_ta * It's enough to register an event only once and then reuse it on followup ionotify rearming calls. * NOTE: If you create a new sigevent for the same file descriptor, with the same flags, you HAVE to register * it again. */ - int rc = MsgRegisterEvent(&ionotify_event_data->event, ionotify_event_data->handle->data.fd); + int rc = MsgRegisterEvent(&ionotify_handle_data->event, ionotify_handle_data->handle->data.fd); int errno_value = errno; if (rc == -1) { AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to register sigevent, errno %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, errno_value); /* With sigevent not registered in the system, I/O events from QNX resource managers can't be delivered * to the event loop. Notify about error via a callback and stop subscribing. */ - ionotify_event_data->on_event( - event_loop, ionotify_event_data->handle, AWS_IO_EVENT_TYPE_ERROR, ionotify_event_data->user_data); + ionotify_handle_data->on_event( + event_loop, ionotify_handle_data->handle, AWS_IO_EVENT_TYPE_ERROR, ionotify_handle_data->user_data); return; } - } else if (!ionotify_event_data->is_subscribed) { + } else if (!ionotify_handle_data->is_subscribed) { /* This is a resubscribing task, but unsubscribe happened, so ignore it. */ return; } - ionotify_event_data->is_subscribed = true; + ionotify_handle_data->is_subscribed = true; /* Everyone is always registered for errors. */ int event_mask = _NOTIFY_COND_EXTEN | _NOTIFY_CONDE_ERR | _NOTIFY_CONDE_HUP | _NOTIFY_CONDE_NVAL; - if (ionotify_event_data->events_subscribed & AWS_IO_EVENT_TYPE_READABLE) { + if (ionotify_handle_data->events_subscribed & AWS_IO_EVENT_TYPE_READABLE) { event_mask |= _NOTIFY_COND_INPUT; event_mask |= _NOTIFY_COND_OBAND; } - if (ionotify_event_data->events_subscribed & AWS_IO_EVENT_TYPE_WRITABLE) { + if (ionotify_handle_data->events_subscribed & AWS_IO_EVENT_TYPE_WRITABLE) { event_mask |= _NOTIFY_COND_OUTPUT; } /* Arm resource manager associated with a given file descriptor in edge-triggered mode. * After this call, a corresponding resource manager starts sending events. */ - int rc = - ionotify(ionotify_event_data->handle->data.fd, _NOTIFY_ACTION_EDGEARM, event_mask, &ionotify_event_data->event); + int rc = ionotify( + ionotify_handle_data->handle->data.fd, _NOTIFY_ACTION_EDGEARM, event_mask, &ionotify_handle_data->event); int errno_value = errno; if (rc == -1) { AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to subscribe to I/O events, errno %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, errno_value); - ionotify_event_data->on_event( - event_loop, ionotify_event_data->handle, AWS_IO_EVENT_TYPE_ERROR, ionotify_event_data->user_data); + ionotify_handle_data->on_event( + event_loop, ionotify_handle_data->handle, AWS_IO_EVENT_TYPE_ERROR, ionotify_handle_data->user_data); return; } /* ionotify can return active conditions if they are among specified. Send notification to kick-start processing fd * if it has desired conditions. */ - /* User-provided field has no space for extended conditions, so set field in ionotify_event_data. */ + /* User-provided field has no space for extended conditions, so set field in ionotify_handle_data. */ if (rc & (_NOTIFY_CONDE_ERR | _NOTIFY_CONDE_NVAL)) { - ionotify_event_data->latest_io_event_types |= AWS_IO_EVENT_TYPE_ERROR; + ionotify_handle_data->latest_io_event_types |= AWS_IO_EVENT_TYPE_ERROR; } if (rc & _NOTIFY_CONDE_HUP) { - ionotify_event_data->latest_io_event_types |= AWS_IO_EVENT_TYPE_CLOSED; + ionotify_handle_data->latest_io_event_types |= AWS_IO_EVENT_TYPE_CLOSED; } if ((rc & (_NOTIFY_COND_OBAND | _NOTIFY_COND_INPUT | _NOTIFY_COND_OUTPUT)) || - ionotify_event_data->latest_io_event_types) { + ionotify_handle_data->latest_io_event_types) { AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Sending a kick-start pulse because fd has desired I/O conditions (rc is %d)", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, rc); /* Set _NOTIFY_COND_MASK low bits to ID, the same as ionotify does, so the main loop can process all pulses in * unified manner. */ int kick_start_event_mask = rc & _NOTIFY_COND_MASK; - kick_start_event_mask |= ionotify_event_data->handle_id; + kick_start_event_mask |= ionotify_handle_data->handle_id; int send_rc = MsgSendPulse( ionotify_event_loop->pulse_connection_id, -1, IO_EVENT_KICKSTART_SIGEV_CODE, kick_start_event_mask); if (send_rc == -1) { @@ -619,7 +619,7 @@ static void s_subscribe_task(struct aws_task *task, void *user_data, enum aws_ta AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to send a kick-start pulse", (void *)event_loop, - ionotify_event_data->handle->data.fd); + ionotify_handle_data->handle->data.fd); } /* QNX resource manager for POSIX pipes has a bug/undocumented behavior when under specific conditions it stops @@ -644,13 +644,13 @@ static void s_subscribe_task(struct aws_task *task, void *user_data, enum aws_ta */ int active_events = rc & (_NOTIFY_COND_OBAND | _NOTIFY_COND_INPUT | _NOTIFY_COND_OUTPUT); if (active_events) { - rc = ionotify(ionotify_event_data->handle->data.fd, _NOTIFY_ACTION_EDGEARM, active_events, NULL); + rc = ionotify(ionotify_handle_data->handle->data.fd, _NOTIFY_ACTION_EDGEARM, active_events, NULL); if (rc == -1) { AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to disarm events", (void *)event_loop, - ionotify_event_data->handle->data.fd); + ionotify_handle_data->handle->data.fd); } } } @@ -665,9 +665,9 @@ static void s_process_io_result( AWS_FATAL_ASSERT(s_is_on_callers_thread(event_loop)); AWS_FATAL_ASSERT(handle->additional_data); - struct aws_ionotify_event_data *ionotify_event_data = handle->additional_data; + struct aws_ionotify_handle_data *ionotify_handle_data = handle->additional_data; - if (!ionotify_event_data->is_subscribed) { + if (!ionotify_handle_data->is_subscribed) { return; } @@ -685,7 +685,7 @@ static void s_process_io_result( int event_types = 0; if (io_op_result->error_code == AWS_IO_SOCKET_CLOSED) { - ionotify_event_data->latest_io_event_types = AWS_IO_EVENT_TYPE_CLOSED; + ionotify_handle_data->latest_io_event_types = AWS_IO_EVENT_TYPE_CLOSED; } if (io_op_result->read_error_code == AWS_IO_READ_WOULD_BLOCK) { event_types |= AWS_IO_EVENT_TYPE_READABLE; @@ -699,32 +699,32 @@ static void s_process_io_result( AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Got EWOULDBLOCK, rearming fd", (void *)event_loop, handle->data.fd); /* We're on the event loop thread, just schedule subscribing task. */ - ionotify_event_data->events_subscribed = event_types; + ionotify_handle_data->events_subscribed = event_types; struct aws_ionotify_event_loop *ionotify_event_loop = event_loop->impl_data; - aws_task_scheduler_cancel_task(&ionotify_event_loop->scheduler, &ionotify_event_data->resubscribe_task); - aws_task_scheduler_schedule_now(&ionotify_event_loop->scheduler, &ionotify_event_data->resubscribe_task); + aws_task_scheduler_cancel_task(&ionotify_event_loop->scheduler, &ionotify_handle_data->resubscribe_task); + aws_task_scheduler_schedule_now(&ionotify_event_loop->scheduler, &ionotify_handle_data->resubscribe_task); } /* Notify event loop of error conditions. */ - if (ionotify_event_data->latest_io_event_types != 0) { + if (ionotify_handle_data->latest_io_event_types != 0) { AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: fd errored, sending UPDATE_ERROR pulse", (void *)event_loop, - ionotify_event_data->handle->data.fd); + ionotify_handle_data->handle->data.fd); struct aws_ionotify_event_loop *ionotify_event_loop = event_loop->impl_data; int send_rc = MsgSendPulse( ionotify_event_loop->pulse_connection_id, -1, IO_EVENT_UPDATE_ERROR_SIGEV_CODE, - ionotify_event_data->handle_id); + ionotify_handle_data->handle_id); int errno_value = errno; if (send_rc == -1) { AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to send UPDATE_ERROR pulse, errno %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, errno_value); } } @@ -792,56 +792,56 @@ static int s_subscribe_to_io_events( AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Initiate subscription to events", (void *)event_loop, handle->data.fd); - struct aws_ionotify_event_data *ionotify_event_data = - aws_mem_calloc(event_loop->alloc, 1, sizeof(struct aws_ionotify_event_data)); - handle->additional_data = ionotify_event_data; - - ionotify_event_data->alloc = event_loop->alloc; - ionotify_event_data->handle = handle; - ionotify_event_data->event_loop = event_loop; - ionotify_event_data->on_event = on_event; - ionotify_event_data->events_subscribed = events; - ionotify_event_data->pulse_connection_id = ionotify_event_loop->pulse_connection_id; - ionotify_event_data->user_data = user_data; - ionotify_event_data->handle->update_io_result = s_update_io_result; + struct aws_ionotify_handle_data *ionotify_handle_data = + aws_mem_calloc(event_loop->alloc, 1, sizeof(struct aws_ionotify_handle_data)); + handle->additional_data = ionotify_handle_data; + + ionotify_handle_data->alloc = event_loop->alloc; + ionotify_handle_data->handle = handle; + ionotify_handle_data->event_loop = event_loop; + ionotify_handle_data->on_event = on_event; + ionotify_handle_data->events_subscribed = events; + ionotify_handle_data->pulse_connection_id = ionotify_event_loop->pulse_connection_id; + ionotify_handle_data->user_data = user_data; + ionotify_handle_data->handle->update_io_result = s_update_io_result; aws_task_init( - &ionotify_event_data->resubscribe_task, + &ionotify_handle_data->resubscribe_task, s_subscribe_task, - ionotify_event_data, + ionotify_handle_data, "ionotify_event_loop_resubscribe"); aws_task_init( - &ionotify_event_data->subscribe_task, s_subscribe_task, ionotify_event_data, "ionotify_event_loop_subscribe"); - s_schedule_task_now(event_loop, &ionotify_event_data->subscribe_task); + &ionotify_handle_data->subscribe_task, s_subscribe_task, ionotify_handle_data, "ionotify_event_loop_subscribe"); + s_schedule_task_now(event_loop, &ionotify_handle_data->subscribe_task); return AWS_OP_SUCCESS; } static void s_free_io_event_resources(void *user_data) { - struct aws_ionotify_event_data *event_data = user_data; - AWS_LOGF_TRACE(AWS_LS_IO_EVENT_LOOP, "Releasing ionotify_event_data at %p", user_data); - aws_mem_release(event_data->alloc, (void *)event_data); + struct aws_ionotify_handle_data *handle_data = user_data; + AWS_LOGF_TRACE(AWS_LS_IO_EVENT_LOOP, "Releasing ionotify_handle_data at %p", user_data); + aws_mem_release(handle_data->alloc, (void *)handle_data); } static void s_unsubscribe_cleanup_task(struct aws_task *task, void *arg, enum aws_task_status status) { (void)task; (void)status; - struct aws_ionotify_event_data *ionotify_event_data = (struct aws_ionotify_event_data *)arg; + struct aws_ionotify_handle_data *ionotify_handle_data = (struct aws_ionotify_handle_data *)arg; - int rc = MsgUnregisterEvent(&ionotify_event_data->event); + int rc = MsgUnregisterEvent(&ionotify_handle_data->event); int errno_value = errno; if (rc == -1) { /* Not much can be done here, so just log error. */ AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to unregister sigevent, errno %d", - (void *)ionotify_event_data->event_loop, - ionotify_event_data->handle->data.fd, + (void *)ionotify_handle_data->event_loop, + ionotify_handle_data->handle->data.fd, errno_value); } - s_free_io_event_resources(ionotify_event_data); + s_free_io_event_resources(ionotify_handle_data); } static int s_unsubscribe_from_io_events(struct aws_event_loop *event_loop, struct aws_io_handle *handle) { @@ -850,46 +850,46 @@ static int s_unsubscribe_from_io_events(struct aws_event_loop *event_loop, struc struct aws_ionotify_event_loop *ionotify_event_loop = event_loop->impl_data; AWS_FATAL_ASSERT(handle->additional_data); - struct aws_ionotify_event_data *ionotify_event_data = handle->additional_data; + struct aws_ionotify_handle_data *ionotify_handle_data = handle->additional_data; /* Disarm resource manager for a given fd. */ int event_mask = _NOTIFY_COND_EXTEN | _NOTIFY_CONDE_ERR | _NOTIFY_CONDE_HUP | _NOTIFY_CONDE_NVAL; event_mask |= _NOTIFY_COND_INPUT | _NOTIFY_CONDE_RDNORM | _NOTIFY_COND_OBAND; event_mask |= _NOTIFY_COND_OUTPUT | _NOTIFY_CONDE_WRNORM; - int rc = ionotify(ionotify_event_data->handle->data.fd, _NOTIFY_ACTION_EDGEARM, event_mask, NULL); + int rc = ionotify(ionotify_handle_data->handle->data.fd, _NOTIFY_ACTION_EDGEARM, event_mask, NULL); int errno_value = errno; if (rc == -1) { AWS_LOGF_ERROR( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Failed to unsubscribe from events, errno %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, errno_value); return aws_raise_error(AWS_ERROR_SYS_CALL_FAILURE); } /* We can't clean up yet, because we have schedule tasks and more events to process, * mark it as unsubscribed and schedule a cleanup task. */ - ionotify_event_data->is_subscribed = false; + ionotify_handle_data->is_subscribed = false; AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Removing from handles map using ID %d", (void *)event_loop, handle->data.fd, - ionotify_event_data->handle_id); - s_remove_handle(event_loop, ionotify_event_loop, ionotify_event_data->handle_id); + ionotify_handle_data->handle_id); + s_remove_handle(event_loop, ionotify_event_loop, ionotify_handle_data->handle_id); handle->additional_data = NULL; handle->update_io_result = NULL; - /* There might be pending tasks for ionotify_event_data, so put a cleanup task. */ + /* There might be pending tasks for ionotify_handle_data, so put a cleanup task. */ aws_task_init( - &ionotify_event_data->cleanup_task, + &ionotify_handle_data->cleanup_task, s_unsubscribe_cleanup_task, - ionotify_event_data, + ionotify_handle_data, "ionotify_event_loop_unsubscribe_cleanup"); - s_schedule_task_now(event_loop, &ionotify_event_data->cleanup_task); + s_schedule_task_now(event_loop, &ionotify_handle_data->cleanup_task); return AWS_OP_SUCCESS; } @@ -977,8 +977,8 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul AWS_LOGF_TRACE(AWS_LS_IO_EVENT_LOOP, "id=%p: Got pulse for handle ID %d", (void *)event_loop, handle_id); struct aws_ionotify_event_loop *ionotify_event_loop = event_loop->impl_data; - struct aws_ionotify_event_data *ionotify_event_data = s_find_handle(event_loop, ionotify_event_loop, handle_id); - if (ionotify_event_data == NULL) { + struct aws_ionotify_handle_data *ionotify_handle_data = s_find_handle(event_loop, ionotify_event_loop, handle_id); + if (ionotify_handle_data == NULL) { /* This situation is totally OK when the corresponding fd is already unsubscribed. */ AWS_LOGF_DEBUG( AWS_LS_IO_EVENT_LOOP, @@ -988,7 +988,7 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul return; } - if (!ionotify_event_data->is_subscribed) { + if (!ionotify_handle_data->is_subscribed) { return; } @@ -996,7 +996,7 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: Processing pulse with code %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, pulse->code); int event_mask = 0; if (pulse->value.sival_int & _NOTIFY_COND_OBAND) { @@ -1004,7 +1004,7 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: fd got out-of-band data", (void *)event_loop, - ionotify_event_data->handle->data.fd); + ionotify_handle_data->handle->data.fd); event_mask |= AWS_IO_EVENT_TYPE_READABLE; } if (pulse->value.sival_int & _NOTIFY_COND_INPUT) { @@ -1012,7 +1012,7 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: fd is readable", (void *)event_loop, - ionotify_event_data->handle->data.fd); + ionotify_handle_data->handle->data.fd); event_mask |= AWS_IO_EVENT_TYPE_READABLE; } if (pulse->value.sival_int & _NOTIFY_COND_OUTPUT) { @@ -1020,7 +1020,7 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: fd is writable", (void *)event_loop, - ionotify_event_data->handle->data.fd); + ionotify_handle_data->handle->data.fd); event_mask |= AWS_IO_EVENT_TYPE_WRITABLE; } if (pulse->value.sival_int & _NOTIFY_COND_EXTEN) { @@ -1032,22 +1032,23 @@ static void s_process_pulse(struct aws_event_loop *event_loop, const struct _pul AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: fd has extended condition, pulse code is %d", (void *)event_loop, - ionotify_event_data->handle->data.fd, + ionotify_handle_data->handle->data.fd, pulse->code); } - if (ionotify_event_data->latest_io_event_types) { + if (ionotify_handle_data->latest_io_event_types) { AWS_LOGF_TRACE( AWS_LS_IO_EVENT_LOOP, "id=%p fd=%d: latest_io_event_types is non-empty", (void *)event_loop, - ionotify_event_data->handle->data.fd); - event_mask |= ionotify_event_data->latest_io_event_types; + ionotify_handle_data->handle->data.fd); + event_mask |= ionotify_handle_data->latest_io_event_types; /* Reset additional I/O event types to not process them twice. */ - ionotify_event_data->latest_io_event_types = 0; + ionotify_handle_data->latest_io_event_types = 0; } - ionotify_event_data->on_event(event_loop, ionotify_event_data->handle, event_mask, ionotify_event_data->user_data); + ionotify_handle_data->on_event( + event_loop, ionotify_handle_data->handle, event_mask, ionotify_handle_data->user_data); } static void aws_event_loop_thread(void *args) {