OSDN Git Service

bionic: add missing memory barriers to system properties
authorGreg Hackmann <ghackmann@google.com>
Thu, 20 Jun 2013 17:33:28 +0000 (10:33 -0700)
committerColin Cross <ccross@android.com>
Mon, 24 Jun 2013 23:35:27 +0000 (16:35 -0700)
commitf7511e3bc932f9f4d025a62871c29bf1e0ac0ea7
treeafa81157847956d9291013d7b948bab992c5006f
parentcb215a7e9ecec9feb5aae9d9a5b1c89f392208e7
bionic: add missing memory barriers to system properties

1) Reading the value must finish before checking whether it's intact

2) Setting the serial's dirty bit must visible before modifying the
value

3) The modified value must be visible before clearing the serial's dirty
bit

4) New properties and their TOC entries must be visible before updating
the property count

Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit 5bfa3ee8b37ef162154559575193018a6235acba)

Change-Id: Id3fa45261fc2df2ae493ab5194bc2b6bff04e966
libc/bionic/system_properties.c