summaryrefslogtreecommitdiffstats
path: root/Documentation/sparse.txt
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-12-27 12:44:11 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-27 12:44:11 -0200
commita44dca1717ce2c2381339e21c07d1731a63a7888 (patch)
tree3d0b3bd26492f9fa1f1f1c1ad838315b266da7c1 /Documentation/sparse.txt
parent30ebc5e44d057a1619ad63fe32c8c1670c37c4b8 (diff)
parenta49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff)
downloadop-kernel-dev-a44dca1717ce2c2381339e21c07d1731a63a7888.zip
op-kernel-dev-a44dca1717ce2c2381339e21c07d1731a63a7888.tar.gz
Merge tag 'v3.8-rc1' into staging/for_v3.9
Linux 3.8-rc1 * tag 'v3.8-rc1': (10696 commits) Linux 3.8-rc1 Revert "nfsd: warn on odd reply state in nfsd_vfs_read" ARM: dts: fix duplicated build target and alphabetical sort out for exynos dm stripe: add WRITE SAME support dm: remove map_info dm snapshot: do not use map_context dm thin: dont use map_context dm raid1: dont use map_context dm flakey: dont use map_context dm raid1: rename read_record to bio_record dm: move target request nr to dm_target_io dm snapshot: use per_bio_data dm verity: use per_bio_data dm raid1: use per_bio_data dm: introduce per_bio_data dm kcopyd: add WRITE SAME support to dm_kcopyd_zero dm linear: add WRITE SAME support dm: add WRITE SAME support dm: prepare to support WRITE SAME dm ioctl: use kmalloc if possible ... Conflicts: MAINTAINERS
Diffstat (limited to 'Documentation/sparse.txt')
-rw-r--r--Documentation/sparse.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt
index 4909d41..eceab13 100644
--- a/Documentation/sparse.txt
+++ b/Documentation/sparse.txt
@@ -49,6 +49,24 @@ be generated without __CHECK_ENDIAN__.
__bitwise - noisy stuff; in particular, __le*/__be* are that. We really
don't want to drown in noise unless we'd explicitly asked for it.
+Using sparse for lock checking
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following macros are undefined for gcc and defined during a sparse
+run to use the "context" tracking feature of sparse, applied to
+locking. These annotations tell sparse when a lock is held, with
+regard to the annotated function's entry and exit.
+
+__must_hold - The specified lock is held on function entry and exit.
+
+__acquires - The specified lock is held on function exit, but not entry.
+
+__releases - The specified lock is held on function entry, but not exit.
+
+If the function enters and exits without the lock held, acquiring and
+releasing the lock inside the function in a balanced way, no
+annotation is needed. The tree annotations above are for cases where
+sparse would otherwise report a context imbalance.
Getting sparse
~~~~~~~~~~~~~~
OpenPOWER on IntegriCloud