Cleaned up pthread rwlocks implementation.

- used underscore_style_for_vars
- extracted time related functionality into a function
- cleaned up style
- removed unused fields from pthread_rwlock_t on LP64
- changed reservation in pthread_rwlock_t so that the size of the
structure equals glibc version

Bug: 8133149

Change-Id: I84ad3918678dc7f5e6b3db9b7e9b0899d3abe9cd
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp
index 8015404..0f42d43 100644
--- a/tests/pthread_test.cpp
+++ b/tests/pthread_test.cpp
@@ -562,8 +562,8 @@
   ASSERT_EQ(0, pthread_rwlock_unlock(&l));
 
   // Write lock
-   ASSERT_EQ(0, pthread_rwlock_wrlock(&l));
-   ASSERT_EQ(0, pthread_rwlock_unlock(&l));
+  ASSERT_EQ(0, pthread_rwlock_wrlock(&l));
+  ASSERT_EQ(0, pthread_rwlock_unlock(&l));
 
   // Try writer lock
   ASSERT_EQ(0, pthread_rwlock_trywrlock(&l));