Commit 543eee6
committed
libtimeinstate: fix potential optimized variable
Per discussion at aosp/3077312/comment/38f6fa69_f6dee70c, the compiler
may optimize out the busy loop. Change to a volatile variable and
initialize to 1 so the *0 calc will not be optimized away.
Test: treehugger
Change-Id: Ic650b5c1b5ca9dcc1ed5817973f9ab831d944c99
Signed-off-by: Neill Kapron <nkapron@google.com>1 parent b310760 commit 543eee6
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
583 | | - | |
| 582 | + | |
| 583 | + | |
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| |||
0 commit comments