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)
committerGreg Hackmann <ghackmann@google.com>
Thu, 20 Jun 2013 21:41:58 +0000 (14:41 -0700)
commit5bfa3ee8b37ef162154559575193018a6235acba
tree514c4627bef05bd6864fe4d95ba08a9402c40325
parentcb4fd62762c23ba3b8d02a6f5329d2fd62b57db8
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

Change-Id: I26c680ec025fdb72362d5f618ec0d2b93d381233
Signed-off-by: Greg Hackmann <ghackmann@google.com>
libc/bionic/system_properties.c