| Index: base/synchronization/read_write_lock.h
|
| diff --git a/base/synchronization/read_write_lock.h b/base/synchronization/read_write_lock.h
|
| index 4c59b7b1168f18b3ee1281c8184c76d5855656da..98fb488aa731c26332b02954748e2f1662785b23 100644
|
| --- a/base/synchronization/read_write_lock.h
|
| +++ b/base/synchronization/read_write_lock.h
|
| @@ -9,7 +9,7 @@
|
| #include "base/macros.h"
|
| #include "build/build_config.h"
|
|
|
| -#if defined(OS_NACL)
|
| +#if defined(OS_NACL) || defined(OS_FUCHSIA)
|
| #include "base/synchronization/lock.h"
|
| #endif
|
|
|
| @@ -17,6 +17,8 @@
|
| #include <windows.h>
|
| #elif defined(OS_POSIX)
|
| #include <pthread.h>
|
| +#elif defined(OS_FUCHSIA)
|
| +#include <threads.h>
|
| #else
|
| # error No reader-writer lock defined for this platform.
|
| #endif
|
| @@ -51,11 +53,13 @@ class BASE_EXPORT ReadWriteLock {
|
| using NativeHandle = Lock;
|
| #elif defined(OS_POSIX)
|
| using NativeHandle = pthread_rwlock_t;
|
| +#elif defined(OS_FUCHSIA)
|
| + using NativeHandle = Lock;
|
| #endif
|
|
|
| NativeHandle native_handle_;
|
|
|
| -#if defined(OS_NACL)
|
| +#if defined(OS_NACL) || defined(OS_FUCHSIA)
|
| // Even though NaCl has a pthread_rwlock implementation, the build rules don't
|
| // make it universally available. So instead, implement a slower and trivial
|
| // reader-writer lock using a regular mutex.
|
|
|