android_packages_modules_Co.../service-t/native/libs/libnetworkstats
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Zuklie 7e9f27be7d Merge ConsumeAllLocked into ConsumeAll
There no longer needs to be separate locked and unlocked methods now
that the buffer has its own mutex.

The most notable change is that within PollAndSchedule, we go from using
try_lock to using the scoped_lock in ConsumeAll. The try_lock was meant
to prevent the following deadlock:
- Stop() takes mMutex and calls mTaskRunner.reset()
- mTaskRunner awaits completion of final closure (PollAndSchedule)
- PollAndSchedule is blocked trying to acquire mMutex

Now that ConsumeAll depends only on mBufferMutex, a more elegant
solution is to just ensure that Stop() isn't holding mBufferMutex while
calling mTaskRunner.reset().

Bug: 320700806
Test: atest libnetworkstats_test
Change-Id: Id5df18bc5809ba193bbe1aa0b97121bd5a8afdcd
2024-09-18 18:37:00 +00:00
..
include/netdbpf Merge ConsumeAllLocked into ConsumeAll 2024-09-18 18:37:00 +00:00
Android.bp Build 2 more tests with static libc++ and version script 2024-05-23 02:16:48 -07:00
BpfNetworkStats.cpp BpfNetworkStats: fallback to if_indextoname() on index->name map lookup failure 2024-01-26 15:24:18 -08:00
BpfNetworkStatsTest.cpp BpfNetworkStats: introduce IfIndexToNameFunc 2024-01-26 15:24:18 -08:00
NetworkTraceHandler.cpp Add ICMP type/code and udplite/sctp in Nettrace. 2023-09-21 15:14:07 -07:00
NetworkTraceHandlerTest.cpp Add ICMP type/code and udplite/sctp in Nettrace. 2023-09-21 15:14:07 -07:00
NetworkTracePoller.cpp Merge ConsumeAllLocked into ConsumeAll 2024-09-18 18:37:00 +00:00
NetworkTracePollerTest.cpp Attempt to fix NetworkTracePollerTest flake 2023-03-16 01:05:39 +00:00