noexcept and constexpr applied to <mutex>.

llvm-svn: 160604
diff --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp
index 9aa051b..42195aa 100644
--- a/libcxx/src/mutex.cpp
+++ b/libcxx/src/mutex.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define _LIBCPP_BUILDING_MUTEX
 #include "mutex"
 #include "limits"
 #include "system_error"
@@ -32,13 +33,13 @@
 }
 
 bool
-mutex::try_lock()
+mutex::try_lock() _NOEXCEPT
 {
     return pthread_mutex_trylock(&__m_) == 0;
 }
 
 void
-mutex::unlock()
+mutex::unlock() _NOEXCEPT
 {
     int ec = pthread_mutex_unlock(&__m_);
     assert(ec == 0);
@@ -90,14 +91,14 @@
 }
 
 void
-recursive_mutex::unlock()
+recursive_mutex::unlock() _NOEXCEPT
 {
     int e = pthread_mutex_unlock(&__m_);
     assert(e == 0);
 }
 
 bool
-recursive_mutex::try_lock()
+recursive_mutex::try_lock() _NOEXCEPT
 {
     return pthread_mutex_trylock(&__m_) == 0;
 }
@@ -124,7 +125,7 @@
 }
 
 bool
-timed_mutex::try_lock()
+timed_mutex::try_lock() _NOEXCEPT
 {
     unique_lock<mutex> lk(__m_, try_to_lock);
     if (lk.owns_lock() && !__locked_)
@@ -136,7 +137,7 @@
 }
 
 void
-timed_mutex::unlock()
+timed_mutex::unlock() _NOEXCEPT
 {
     lock_guard<mutex> _(__m_);
     __locked_ = false;
@@ -175,7 +176,7 @@
 }
 
 bool
-recursive_timed_mutex::try_lock()
+recursive_timed_mutex::try_lock() _NOEXCEPT
 {
     pthread_t id = pthread_self();
     unique_lock<mutex> lk(__m_, try_to_lock);
@@ -191,7 +192,7 @@
 }
 
 void
-recursive_timed_mutex::unlock()
+recursive_timed_mutex::unlock() _NOEXCEPT
 {
     unique_lock<mutex> lk(__m_);
     if (--__count_ == 0)