Skip to content
Snippets Groups Projects
Commit ca34f87e authored by Kamal Negi's avatar Kamal Negi
Browse files

Check for TX event before waiting for an event

Check for an event before waiting for an event. If event already signalled
and we wait for an event without checking, it can lead to an infinite wait
for signal. This results in functional failure.

CRs-Fixed: 1091781
Change-Id: I7bb1ef12f4622f9d94621a9c486a771226aba9f4
parent 7e407490
No related branches found
No related tags found
No related merge requests found
......@@ -338,7 +338,8 @@ static void* hci_tx_thread(void *arg)
while (lib_running) {
pthread_mutex_lock(&hci->event_lock);
pthread_cond_wait(&hci->event_cond, &hci->event_lock);
if (!(ready_events & HC_EVENT_TX))
pthread_cond_wait(&hci->event_cond, &hci->event_lock);
ALOGE("%s: ready_events= %d", __func__, ready_events);
events = ready_events;
if (ready_events & HC_EVENT_TX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment