diff options
author | Mathias Agopian <mathias@google.com> | 2010-05-18 17:06:55 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-05-20 18:00:42 -0700 |
commit | bb641244d7d73312dc65b8e338df18b22e335107 (patch) | |
tree | 4a3e6e847513ad28bedd8de68da4ef2bd6ebf5ff /libs/surfaceflinger/Barrier.h | |
parent | dcf01e6644d0e9eca5aa08ee1b16a0d29d039e5e (diff) | |
download | frameworks_native-bb641244d7d73312dc65b8e338df18b22e335107.zip frameworks_native-bb641244d7d73312dc65b8e338df18b22e335107.tar.gz frameworks_native-bb641244d7d73312dc65b8e338df18b22e335107.tar.bz2 |
fix the threading issue for setBuffercount()
this change introduces R/W locks in the right places.
on the server-side, it guarantees that setBufferCount()
is synchronized with "retire" and "resize".
on the client-side, it guarantees that setBufferCount()
is synchronized with "dequeue", "lockbuffer" and "queue"
Diffstat (limited to 'libs/surfaceflinger/Barrier.h')
-rw-r--r-- | libs/surfaceflinger/Barrier.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libs/surfaceflinger/Barrier.h b/libs/surfaceflinger/Barrier.h index e2bcf6a..6f8507e 100644 --- a/libs/surfaceflinger/Barrier.h +++ b/libs/surfaceflinger/Barrier.h @@ -29,10 +29,6 @@ public: inline Barrier() : state(CLOSED) { } inline ~Barrier() { } void open() { - // gcc memory barrier, this makes sure all memory writes - // have been issued by gcc. On an SMP system we'd need a real - // h/w barrier. - asm volatile ("":::"memory"); Mutex::Autolock _l(lock); state = OPENED; cv.broadcast(); |