aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEwout van Bekkum <ewout@google.com>2021-04-02 16:48:50 -0700
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-04-03 01:31:26 +0000
commitfe7006641b1fbda3d30d55188d88d09e365b2305 (patch)
treec72f64c2dcca5ca9a23f80e55a5b0069012dc6a0
parent3b9eca49b06c923d8dbee72d092572aa66844e0c (diff)
downloadpigweed-fe7006641b1fbda3d30d55188d88d09e365b2305.tar.gz
pw_sync: migrate docs to use list tables
Change-Id: I9290fa8a76e33ba3abf238b62f457e9c1cac5545 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/39912 Reviewed-by: Keir Mierle <keir@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
-rw-r--r--pw_sync/docs.rst155
1 files changed, 102 insertions, 53 deletions
diff --git a/pw_sync/docs.rst b/pw_sync/docs.rst
index 7a6b552bf..aec5900e6 100644
--- a/pw_sync/docs.rst
+++ b/pw_sync/docs.rst
@@ -117,24 +117,41 @@ C++
**Precondition:** The mutex is held by this thread.
- +--------------------------------+----------+-------------+-------+
- | *Safe to use in context* | *Thread* | *Interrupt* | *NMI* |
- +--------------------------------+----------+-------------+-------+
- | ``Mutex::Mutex`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
- | ``Mutex::~Mutex`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
- | ``void Mutex::lock`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
- | ``bool Mutex::try_lock`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
- | ``bool Mutex::try_lock_for`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
- | ``bool Mutex::try_lock_until`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
- | ``void Mutex::unlock`` | ✔ | | |
- +--------------------------------+----------+-------------+-------+
+ .. list-table::
+
+ * - *Safe to use in context*
+ - *Thread*
+ - *Interrupt*
+ - *NMI*
+ * - ``Mutex::Mutex``
+ - ✔
+ -
+ -
+ * - ``Mutex::~Mutex``
+ - ✔
+ -
+ -
+ * - ``void Mutex::lock``
+ - ✔
+ -
+ -
+ * - ``bool Mutex::try_lock``
+ - ✔
+ -
+ -
+ * - ``bool Mutex::try_lock_for``
+ - ✔
+ -
+ -
+ * - ``bool Mutex::try_lock_until``
+ - ✔
+ -
+ -
+ * - ``void Mutex::unlock``
+ - ✔
+ -
+ -
Examples in C++
^^^^^^^^^^^^^^^
@@ -215,20 +232,32 @@ The Mutex must be created in C++, however it can be passed into C using the
Invokes the ``Mutex::unlock`` member function on the given ``mutex``.
-+-------------------------------------+----------+-------------+-------+
-| *Safe to use in context* | *Thread* | *Interrupt* | *NMI* |
-+-------------------------------------+----------+-------------+-------+
-| ``void pw_sync_Mutex_Lock`` | ✔ | | |
-+-------------------------------------+----------+-------------+-------+
-| ``bool pw_sync_Mutex_TryLock`` | ✔ | | |
-+-------------------------------------+----------+-------------+-------+
-| ``bool pw_sync_Mutex_TryLockFor`` | ✔ | | |
-+-------------------------------------+----------+-------------+-------+
-| ``bool pw_sync_Mutex_TryLockUntil`` | ✔ | | |
-+-------------------------------------+----------+-------------+-------+
-| ``void pw_sync_Mutex_Unlock`` | ✔ | | |
-+-------------------------------------+----------+-------------+-------+
+.. list-table::
+ * - *Safe to use in context*
+ - *Thread*
+ - *Interrupt*
+ - *NMI*
+ * - ``void pw_sync_Mutex_Lock``
+ - ✔
+ -
+ -
+ * - ``bool pw_sync_Mutex_TryLock``
+ - ✔
+ -
+ -
+ * - ``bool pw_sync_Mutex_TryLockFor``
+ - ✔
+ -
+ -
+ * - ``bool pw_sync_Mutex_TryLockUntil``
+ - ✔
+ -
+ -
+ * - ``void pw_sync_Mutex_Unlock``
+ - ✔
+ -
+ -
Example in C
^^^^^^^^^^^^
@@ -322,20 +351,32 @@ C++
**Precondition:** The spinlock is held by the caller.
- +-------------------------------------------+----------+-------------+-------+
- | *Safe to use in context* | *Thread* | *Interrupt* | *NMI* |
- +-------------------------------------------+----------+-------------+-------+
- | ``InterruptSpinLock::InterruptSpinLock`` | ✔ | ✔ | |
- +-------------------------------------------+----------+-------------+-------+
- | ``InterruptSpinLock::~InterruptSpinLock`` | ✔ | ✔ | |
- +-------------------------------------------+----------+-------------+-------+
- | ``void InterruptSpinLock::lock`` | ✔ | ✔ | |
- +-------------------------------------------+----------+-------------+-------+
- | ``bool InterruptSpinLock::try_lock`` | ✔ | ✔ | |
- +-------------------------------------------+----------+-------------+-------+
- | ``void InterruptSpinLock::unlock`` | ✔ | ✔ | |
- +-------------------------------------------+----------+-------------+-------+
-
+ .. list-table::
+
+ * - *Safe to use in context*
+ - *Thread*
+ - *Interrupt*
+ - *NMI*
+ * - ``InterruptSpinLock::InterruptSpinLock``
+ - ✔
+ - ✔
+ -
+ * - ``InterruptSpinLock::~InterruptSpinLock``
+ - ✔
+ - ✔
+ -
+ * - ``void InterruptSpinLock::lock``
+ - ✔
+ - ✔
+ -
+ * - ``bool InterruptSpinLock::try_lock``
+ - ✔
+ - ✔
+ -
+ * - ``void InterruptSpinLock::unlock``
+ - ✔
+ - ✔
+ -
Examples in C++
^^^^^^^^^^^^^^^
@@ -385,16 +426,24 @@ The InterruptSpinLock must be created in C++, however it can be passed into C us
Invokes the ``InterruptSpinLock::unlock`` member function on the given ``interrupt_spin_lock``.
-+--------------------------------------------+----------+-------------+-------+
-| *Safe to use in context* | *Thread* | *Interrupt* | *NMI* |
-+--------------------------------------------+----------+-------------+-------+
-| ``void pw_sync_InterruptSpinLock_Lock`` | ✔ | ✔ | |
-+--------------------------------------------+----------+-------------+-------+
-| ``bool pw_sync_InterruptSpinLock_TryLock`` | ✔ | ✔ | |
-+--------------------------------------------+----------+-------------+-------+
-| ``void pw_sync_InterruptSpinLock_Unlock`` | ✔ | ✔ | |
-+--------------------------------------------+----------+-------------+-------+
+.. list-table::
+ * - *Safe to use in context*
+ - *Thread*
+ - *Interrupt*
+ - *NMI*
+ * - ``void pw_sync_InterruptSpinLock_Lock``
+ - ✔
+ - ✔
+ -
+ * - ``bool pw_sync_InterruptSpinLock_TryLock``
+ - ✔
+ - ✔
+ -
+ * - ``void pw_sync_InterruptSpinLock_Unlock``
+ - ✔
+ - ✔
+ -
Example in C
^^^^^^^^^^^^