OSDN Git Service

implement flow control to avoid dropping packets in btif_media_task.
authorZhihai Xu <zhihaixu@google.com>
Thu, 19 Sep 2013 18:30:44 +0000 (11:30 -0700)
committerZhihai Xu <zhihaixu@google.com>
Mon, 16 Dec 2013 21:23:01 +0000 (13:23 -0800)
commit4aebca4662c280fdc32e0ad3705cae064bfa068d
tree8d989126d5365f191cdc88c03003fa07446c9b6b
parent01c686ce0051433d75605ff9ca4c3b7388ce3b6b
implement flow control to avoid dropping packets in btif_media_task.

implment flow conrol to save CPU usage and avoid dropping
packet in btif_media_task when overflow and cpu preemption happen.
when the packet count in the queue is above high watermark, we will
stopping adding packets, when the packet count in the queue is below
low watermark, we will start adding packets again.

bug:8252054
Change-Id: I3b7795dffbe5f2ae455e239a0234533f6cbb4403
btif/src/btif_media_task.c