Lines Matching refs:wait_entry

138 static void enqueue_command(waiting_command_t* wait_entry);
139 static void event_command_ready(waiting_command_t* wait_entry);
318 waiting_command_t* wait_entry = reinterpret_cast<waiting_command_t*>( in transmit_command() local
322 STREAM_TO_UINT16(wait_entry->opcode, stream); in transmit_command()
323 wait_entry->complete_callback = complete_callback; in transmit_command()
324 wait_entry->status_callback = status_callback; in transmit_command()
325 wait_entry->command = command; in transmit_command()
326 wait_entry->context = context; in transmit_command()
332 enqueue_command(wait_entry); in transmit_command()
336 waiting_command_t* wait_entry = reinterpret_cast<waiting_command_t*>( in transmit_command_futured() local
341 STREAM_TO_UINT16(wait_entry->opcode, stream); in transmit_command_futured()
342 wait_entry->complete_future = future; in transmit_command_futured()
343 wait_entry->command = command; in transmit_command_futured()
349 enqueue_command(wait_entry); in transmit_command_futured()
395 static void enqueue_command(waiting_command_t* wait_entry) { in enqueue_command() argument
396 base::Closure callback = base::Bind(&event_command_ready, wait_entry); in enqueue_command()
402 buffer_allocator->free(wait_entry->command); in enqueue_command()
403 osi_free(wait_entry); in enqueue_command()
412 static void event_command_ready(waiting_command_t* wait_entry) { in event_command_ready() argument
417 wait_entry->timestamp = std::chrono::steady_clock::now(); in event_command_ready()
418 list_append(commands_pending_response, wait_entry); in event_command_ready()
421 packet_fragmenter->fragment_and_dispatch(wait_entry->command); in event_command_ready()
499 waiting_command_t* wait_entry = in command_timed_out_log_info() local
504 std::chrono::steady_clock::now() - wait_entry->timestamp) in command_timed_out_log_info()
507 wait_time_ms, wait_entry->opcode, in command_timed_out_log_info()
508 (wait_entry == original_wait_entry) ? "*matches timer*" : ""); in command_timed_out_log_info()
511 uint8_t* command = wait_entry->command->data + wait_entry->command->offset; in command_timed_out_log_info()
512 if (wait_entry->command->len > 3) { in command_timed_out_log_info()
514 wait_entry->command->len, command[0], command[1], command[2], in command_timed_out_log_info()
518 wait_entry->command->len, command[0], command[1], command[2]); in command_timed_out_log_info()
521 LOG_EVENT_INT(BT_HCI_TIMEOUT_TAG_NUM, wait_entry->opcode); in command_timed_out_log_info()
522 bluetooth::common::LogHciTimeoutEvent(wait_entry->opcode); in command_timed_out_log_info()
651 waiting_command_t* wait_entry = NULL; in filter_incoming_event() local
665 wait_entry = get_waiting_command(opcode); in filter_incoming_event()
669 if (!wait_entry) { in filter_incoming_event()
678 if (wait_entry->complete_callback) { in filter_incoming_event()
679 wait_entry->complete_callback(packet, wait_entry->context); in filter_incoming_event()
680 } else if (wait_entry->complete_future) { in filter_incoming_event()
681 future_ready(wait_entry->complete_future, packet); in filter_incoming_event()
699 wait_entry = get_waiting_command(opcode); in filter_incoming_event()
703 if (!wait_entry) { in filter_incoming_event()
709 if (wait_entry->status_callback) in filter_incoming_event()
710 wait_entry->status_callback(status, wait_entry->command, in filter_incoming_event()
711 wait_entry->context); in filter_incoming_event()
742 if (wait_entry) { in filter_incoming_event()
745 (!wait_entry->complete_callback && !wait_entry->complete_future)) in filter_incoming_event()
749 if (event_code == HCI_COMMAND_COMPLETE_EVT || !wait_entry->status_callback) in filter_incoming_event()
750 buffer_allocator->free(wait_entry->command); in filter_incoming_event()
752 osi_free(wait_entry); in filter_incoming_event()
777 waiting_command_t* wait_entry = in get_waiting_command() local
780 if (!wait_entry || wait_entry->opcode != opcode) continue; in get_waiting_command()
782 list_remove(commands_pending_response, wait_entry); in get_waiting_command()
784 return wait_entry; in get_waiting_command()