OSDN Git Service

Fix, generalize stdatomic.h; improve test.
authorHans Boehm <hboehm@google.com>
Tue, 19 Aug 2014 23:14:01 +0000 (16:14 -0700)
committerHans Boehm <hboehm@google.com>
Tue, 2 Sep 2014 17:32:33 +0000 (10:32 -0700)
commitc8cf3513ecb265ba3aadc846aa2113290a504c44
tree087fc68abafe155789abe2f966c27941973be902
parentc191a8adee7ff000b6dd71ee336a12118e2a4733
Fix, generalize stdatomic.h; improve test.

We seem to use this stdatomic.h sometimes, and slightly different prebuilts
at other times, making them all difficult to test, and making it unclear
which one we're testing.  This generalizes the bionic header so that it
can be used directly as the prebuilt header as well.  So long as they
don't diverge again, that should somewhat improve test coverage.

Use the correct builtin for atomic_is_lock_free.

Fix atomic_flag_init.

Turn on atomic tests even with __GLIBC__, since they now appear to pass.

Include uchar.h in stdatomic.h where needed.

Add a basic memory ordering test.

Fix bit-rotted comments in bionic tests makefile.

Prerequisite for fixing b/16880454 and

Bug:16513433

Change-Id: If6a14c1075b379395ba5d93357d56025c0ffab68
(cherry picked from commit 00aaea364501b3b0abe58dae461136159df1e356)
libc/include/stdatomic.h
tests/Android.mk
tests/stdatomic_test.cpp