OSDN Git Service

Introduce MultiPriorityQueue
authorHansong Zhang <hsz@google.com>
Fri, 15 Jan 2021 05:58:27 +0000 (21:58 -0800)
committerHansong Zhang <hsz@google.com>
Fri, 15 Jan 2021 19:42:35 +0000 (11:42 -0800)
commitec12c83bb325e44af1aafff6b2d93c55754f52f6
tree85e3e21934a68c10ccaa7f13b59ee7738617ba91
parent04291d3cf5cd1cab30ac1bafd9f4b650d9c7928d
Introduce MultiPriorityQueue

ACL and L2cap needs to prioritize some link/channels in some cases.  A
traditional priority queue requires predefined comparison, which can be
hard for our use case (PacketBuilder).  Instead, we specify the priority
value when we push to a queue.

Test: bluetooth_test_gd
Tag: #gd-refactor
Bug: 141555841
Change-Id: I33414b4bf81e9f63c88d8627376b565f5c5bb6de
gd/common/Android.bp
gd/common/multi_priority_queue.h [new file with mode: 0644]
gd/common/multi_priority_queue_test.cc [new file with mode: 0644]