Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRodrigo Kumpera <kumpera@gmail.com>2009-02-12 04:16:09 +0300
committerRodrigo Kumpera <kumpera@gmail.com>2009-02-12 04:16:09 +0300
commit8f91e420d7fbbab7da758e57160d1d762129f38a (patch)
treecae2304f9fc9e5f5c5a2d87381175522ae445254 /docs
parent3d0d54794b664c4db01cdb1e5263cac45ce5d6b4 (diff)
In .:
* thread-safety.txt: Improve the docs about image lock. 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com> svn path=/trunk/mono/; revision=126671
Diffstat (limited to 'docs')
-rw-r--r--docs/ChangeLog4
-rw-r--r--docs/thread-safety.txt14
2 files changed, 10 insertions, 8 deletions
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 87ccf5c1f39..79952cb6787 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -1,5 +1,9 @@
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.
2008-12-12 Mark Probst <mark.probst@gmail.com>
diff --git a/docs/thread-safety.txt b/docs/thread-safety.txt
index b2906050694..c1e5d7f8720 100644
--- a/docs/thread-safety.txt
+++ b/docs/thread-safety.txt
@@ -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,