Fix raise(3) so it works in signal handlers.

We could special-case raise(3) in non-threaded programs, but the more
conservative course is to make pthread_kill(3) work in signal handlers
at the cost of a race shared by other C libraries.

Change-Id: I59fb23d03bdabf403435e731704b33acdf3e0234
diff --git a/libc/bionic/pthread_accessor.h b/libc/bionic/pthread_accessor.h
index eb8c350..2a320f6 100644
--- a/libc/bionic/pthread_accessor.h
+++ b/libc/bionic/pthread_accessor.h
@@ -36,6 +36,14 @@
     Unlock();
   }
 
+  void Unlock() {
+    if (is_locked_) {
+      is_locked_ = false;
+      thread_ = NULL;
+      pthread_mutex_unlock(&gThreadListLock);
+    }
+  }
+
   pthread_internal_t& operator*() const { return *thread_; }
   pthread_internal_t* operator->() const { return thread_; }
   pthread_internal_t* get() const { return thread_; }
@@ -49,14 +57,6 @@
     is_locked_ = true;
   }
 
-  void Unlock() {
-    if (is_locked_) {
-      is_locked_ = false;
-      thread_ = NULL;
-      pthread_mutex_unlock(&gThreadListLock);
-    }
-  }
-
   // Disallow copy and assignment.
   pthread_accessor(const pthread_accessor&);
   void operator=(const pthread_accessor&);