[master] isc_atomic_storeq()/stats improvements

4248.	[func]		Add an isc_atomic_storeq() function, use it in
			stats counters to improve performance.
			[RT #39972] [RT #39979]
This commit is contained in:
Evan Hunt
2015-10-28 22:19:18 -07:00
parent 1ff2118d6c
commit 821ff5e8fa
11 changed files with 285 additions and 41 deletions

View File

@@ -117,6 +117,12 @@ ATF_TC_BODY(snprintf, tc) {
n = isc_print_snprintf(buf, sizeof(buf), "%zo", size);
ATF_CHECK_EQ(n, 4);
ATF_CHECK_STREQ(buf, "1750");
zz = 0xf5f5f5f5f5f5f5f5;
memset(buf, 0xff, sizeof(buf));
n = isc_print_snprintf(buf, sizeof(buf), "0x%"ISC_PRINT_QUADFORMAT"x", zz);
ATF_CHECK_EQ(n, 18);
ATF_CHECK_STREQ(buf, "0xf5f5f5f5f5f5f5f5");
}
ATF_TC(fprintf);