coverage: Make thread-safe.
authorBen Pfaff <blp@nicira.com>
Tue, 20 Aug 2013 20:46:33 +0000 (13:46 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 20 Aug 2013 20:46:33 +0000 (13:46 -0700)
commit857165b5fd264ccfcd89462259e917da20071a0a
treeb14526eb0a068b1fcf6d549139bb1dfd1fd0fecd
parent834d6cafe4797861b7547966b4dcc95b374331be
coverage: Make thread-safe.

This makes each of the coverage counters per-thread.  It abandons the
idea of trying to keep track of the number of hits in the "current" poll
loop, since there are many poll loops running, each in its own thread, as
well as the idea of numbering epochs for the same reason.  Instead, we
just keep track of overall totals for the process for each coverage
counter, accumulating per-thread counts into the global total each time
a thread's main loop passes through poll_block().

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/coverage.c
lib/coverage.h