- /* Look in the event queue to find an event that is ready
- to be processed. */
-
- if (!QUEUE_is_empty (gdb_event_p, event_queue))
- {
- /* Let's get rid of the event from the event queue. We need to
- do this now because while processing the event, the proc
- function could end up calling 'error' and therefore jump out
- to the caller of this function, gdb_do_one_event. In that
- case, we would have on the event queue an event wich has been
- processed, but not deleted. */
- gdb_event *event_ptr = QUEUE_deque (gdb_event_p, event_queue);
- /* Call the handler for the event. */
- event_handler_func *proc = event_ptr->proc;
- event_data data = event_ptr->data;
-
- gdb_event_xfree (event_ptr);
-
- /* Now call the procedure associated with the event. */
- (*proc) (data);
- return 1;
- }
-
- /* This is the case if there are no event on the event queue. */
- return 0;
+ add_file_handler (serial_event_fd (async_signal_handlers_serial_event),
+ async_signals_handler, NULL);