diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-05-11 15:15:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-05-16 07:44:03 -0400 |
commit | dc89fca93ec05a2125b1dfa78efe0e8c7668c8fb (patch) | |
tree | 03f4cc66d31739ba25c3f6205c00d7f0df629706 /Documentation/kernel-hacking | |
parent | 475c5ef83d26c399a55b106398e9dcb38e6d888b (diff) |
locking.rst: Update some ReST markups
Correct a few minor issues with ReST notation used on
this file (produced by an automatic tool).
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/kernel-hacking')
-rw-r--r-- | Documentation/kernel-hacking/locking.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Documentation/kernel-hacking/locking.rst b/Documentation/kernel-hacking/locking.rst index b70c2c4eb147..f937c0fd11aa 100644 --- a/Documentation/kernel-hacking/locking.rst +++ b/Documentation/kernel-hacking/locking.rst | |||
@@ -93,13 +93,13 @@ Locking in the Linux Kernel | |||
93 | =========================== | 93 | =========================== |
94 | 94 | ||
95 | If I could give you one piece of advice: never sleep with anyone crazier | 95 | If I could give you one piece of advice: never sleep with anyone crazier |
96 | than yourself. But if I had to give you advice on locking: *keep it | 96 | than yourself. But if I had to give you advice on locking: **keep it |
97 | simple*. | 97 | simple**. |
98 | 98 | ||
99 | Be reluctant to introduce new locks. | 99 | Be reluctant to introduce new locks. |
100 | 100 | ||
101 | Strangely enough, this last one is the exact reverse of my advice when | 101 | Strangely enough, this last one is the exact reverse of my advice when |
102 | you *have* slept with someone crazier than yourself. And you should | 102 | you **have** slept with someone crazier than yourself. And you should |
103 | think about getting a big dog. | 103 | think about getting a big dog. |
104 | 104 | ||
105 | Two Main Types of Kernel Locks: Spinlocks and Mutexes | 105 | Two Main Types of Kernel Locks: Spinlocks and Mutexes |
@@ -311,7 +311,7 @@ Pete Zaitcev gives the following summary: | |||
311 | Table of Minimum Requirements | 311 | Table of Minimum Requirements |
312 | ----------------------------- | 312 | ----------------------------- |
313 | 313 | ||
314 | The following table lists the *minimum* locking requirements between | 314 | The following table lists the **minimum** locking requirements between |
315 | various contexts. In some cases, the same context can only be running on | 315 | various contexts. In some cases, the same context can only be running on |
316 | one CPU at a time, so no locking is required for that context (eg. a | 316 | one CPU at a time, so no locking is required for that context (eg. a |
317 | particular thread can only run on one CPU at a time, but if it needs | 317 | particular thread can only run on one CPU at a time, but if it needs |
@@ -703,7 +703,7 @@ reference count, but they are more complicated. | |||
703 | Using Atomic Operations For The Reference Count | 703 | Using Atomic Operations For The Reference Count |
704 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 704 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
705 | 705 | ||
706 | In practice, ``atomic_t`` would usually be used for refcnt. There are a | 706 | In practice, :c:type:`atomic_t` would usually be used for refcnt. There are a |
707 | number of atomic operations defined in ``include/asm/atomic.h``: these | 707 | number of atomic operations defined in ``include/asm/atomic.h``: these |
708 | are guaranteed to be seen atomically from all CPUs in the system, so no | 708 | are guaranteed to be seen atomically from all CPUs in the system, so no |
709 | lock is required. In this case, it is simpler than using spinlocks, | 709 | lock is required. In this case, it is simpler than using spinlocks, |
@@ -1321,7 +1321,7 @@ from user context, and can sleep. | |||
1321 | 1321 | ||
1322 | - :c:func:`put_user()` | 1322 | - :c:func:`put_user()` |
1323 | 1323 | ||
1324 | - ``kmalloc(GFP_KERNEL)`` | 1324 | - :c:func:`kmalloc(GFP_KERNEL) <kmalloc>` |
1325 | 1325 | ||
1326 | - :c:func:`mutex_lock_interruptible()` and | 1326 | - :c:func:`mutex_lock_interruptible()` and |
1327 | :c:func:`mutex_lock()` | 1327 | :c:func:`mutex_lock()` |
@@ -1431,10 +1431,10 @@ tasklet | |||
1431 | timer | 1431 | timer |
1432 | A dynamically-registrable software interrupt, which is run at (or close | 1432 | A dynamically-registrable software interrupt, which is run at (or close |
1433 | to) a given time. When running, it is just like a tasklet (in fact, they | 1433 | to) a given time. When running, it is just like a tasklet (in fact, they |
1434 | are called from the TIMER_SOFTIRQ). | 1434 | are called from the ``TIMER_SOFTIRQ``). |
1435 | 1435 | ||
1436 | UP | 1436 | UP |
1437 | Uni-Processor: Non-SMP. (CONFIG_SMP=n). | 1437 | Uni-Processor: Non-SMP. (``CONFIG_SMP=n``). |
1438 | 1438 | ||
1439 | User Context | 1439 | User Context |
1440 | The kernel executing on behalf of a particular process (ie. a system | 1440 | The kernel executing on behalf of a particular process (ie. a system |