pw_sync: split out pw::sync::TimedMutex from pw::sync::Mutex

Change-Id: I6a52123759045658cc21aaa3254279d95c23ed6e
Requires: pigweed-internal:11280
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/40083
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_sync_embos/BUILD b/pw_sync_embos/BUILD
index 1adc21c..da66e9e 100644
--- a/pw_sync_embos/BUILD
+++ b/pw_sync_embos/BUILD
@@ -101,24 +101,51 @@
     deps = [
         # TODO(pwbug/317): This should depend on embOS but our third parties
         # currently do not have Bazel support.
-        "//pw_chrono:system_clock",
-        "//pw_chrono_embos:system_clock_headers",
+        "//pw_sync:mutex_facade",
     ],
 )
 
 pw_cc_library(
     name = "mutex",
-    srcs = [
-        "mutex.cc",
-    ],
     deps = [
         ":mutex_headers",
-        "//pw_interrupt:context",
         "//pw_sync:mutex_facade",
     ],
 )
 
 pw_cc_library(
+    name = "timed_mutex_headers",
+    hdrs = [
+        "public/pw_sync_embos/timed_mutex_inline.h",
+        "public_overrides/pw_sync_backend/timed_mutex_inline.h",
+    ],
+    includes = [
+        "public",
+        "public_overrides",
+    ],
+    deps = [
+        # TODO(pwbug/317): This should depend on embOS but our third parties
+        # currently do not have Bazel support.
+        "//pw_chrono:system_clock",
+        "//pw_sync:timed_mutex_facade",
+    ],
+)
+
+pw_cc_library(
+    name = "timed_mutex",
+    srcs = [
+        "timed_mutex.cc",
+    ],
+    deps = [
+        ":timed_mutex_headers",
+        "//pw_interrupt:context",
+        "//pw_sync:timed_mutex_facade",
+        "//pw_chrono_embos:system_clock_headers",
+    ],
+)
+
+
+pw_cc_library(
     name = "interrupt_spin_lock_headers",
     hdrs = [
         "public/pw_sync_embos/interrupt_spin_lock_inline.h",