In .:
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 12 Feb 2009 01:16:09 +0000 (01:16 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 12 Feb 2009 01:16:09 +0000 (01:16 -0000)
* thread-safety.txt: Improve the docs about image lock.

2009-02-11  Rodrigo Kumpera  <rkumpera@novell.com>

svn path=/trunk/mono/; revision=126671

docs/ChangeLog
docs/thread-safety.txt

index 87ccf5c1f39e968f4de51b0619c65a4a701abfcc..79952cb678781773a85a86773a4b96036c774e0d 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-11  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * thread-safety.txt: Improve the docs about image lock.
+
 2009-02-11  Rodrigo Kumpera  <rkumpera@novell.com>
 
        * thread-safety.txt: Document the new image lock.
index b29060506946c02991b3dcbf9acaaa515ba528cf..c1e5d7f8720083947dbe7de8123f2712325940b5 100644 (file)
@@ -36,9 +36,14 @@ locks which might obtain global locks (i.e. locks known outside this module).
  There are a lot of global data structures which can be protected by a 'simple' lock. Simple means:
     - the lock protects only this data structure or it only protects the data structures in a given C module.
       An example would be the appdomains list in domain.c
+    - the lock can span many modules, but it still protects access to a single resource or set of resources.
+      An example would be the image lock, which protects all data structures that belong to a given MonoImage. 
     - the lock is only held for a short amount of time, and no other lock is acquired inside this simple lock. Thus there is
       no possibility of deadlock.
 
+ Simple locks include, at least, the following :
+    - the per-image lock acquired by using mono_image_(un)lock functions.
+
 1.3.2 The class loader lock
 ---------------------------
 
@@ -50,14 +55,7 @@ protects the various caches inside MonoImage which are used by these modules.
 
 Each appdomain has a lock which protects the per-domain data structures.
 
-1.3.4 The image lock
---------------------
-
-Each MonoImage has a lock which protects the per-image data structures and memory pool. This lock must only
-be held while manipulating such structures and no call to any function besides that should be made. In special,
-no other runtime lock should be acquired while holding an image lock.
-
-1.3.5 The locking hierarchy
+1.3.4 The locking hierarchy
 ---------------------------
 
 It is useful to model locks by a locking hierarchy, which is a relation between locks, which is reflexive, transitive,