summaryrefslogtreecommitdiff
path: root/storage/maria/lockman.h
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2006-10-18 17:24:07 +0200
committerunknown <serg@janus.mylan>2006-10-18 17:24:07 +0200
commit12a55aeabc353fdc1c3829ddd8baacb142160c80 (patch)
tree660c00763097e4fd6cbb954397696684f6d4b810 /storage/maria/lockman.h
parent67a2b7cf298d0a351256ab13c2577c32e20bd723 (diff)
downloadmariadb-git-12a55aeabc353fdc1c3829ddd8baacb142160c80.tar.gz
lock manager passed unit tests
storage/maria/trnman.c: comments include/my_dbug.h: make DBUG_ASSERT always a statement storage/maria/lockman.h: comments include/lf.h: lf_pinbox - don't use a fixed-size purgatory. mysys/lf_alloc-pin.c: lf_pinbox - don't use a fixed-size purgatory. mysys/lf_hash.c: lf_pinbox - don't use a fixed-size purgatory. storage/maria/lockman.c: removed IGNORE_ME/UPGDARED matching - it was wrong in the first place. updated for "lf_pinbox - don't use a fixed-size purgatory" storage/maria/unittest/lockman-t.c: IGNORE_ME/UPGRADED pair counting bugtest. more tests unittest/mysys/my_atomic-t.c: lf_pinbox - don't use a fixed-size purgatory.
Diffstat (limited to 'storage/maria/lockman.h')
-rw-r--r--storage/maria/lockman.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/maria/lockman.h b/storage/maria/lockman.h
index a3c96786935..9edd79eb7f1 100644
--- a/storage/maria/lockman.h
+++ b/storage/maria/lockman.h
@@ -18,7 +18,10 @@
#define _lockman_h
/*
- N - "no lock", not a lock, used sometimes to simplify the code
+ Lock levels:
+ ^^^^^^^^^^^
+
+ N - "no lock", not a lock, used sometimes internally to simplify the code
S - Shared
X - eXclusive
IS - Intention Shared
@@ -35,8 +38,8 @@ struct lockman_lock;
typedef struct st_lock_owner LOCK_OWNER;
struct st_lock_owner {
- LF_PINS *pins;
- struct lockman_lock *all_locks;
+ LF_PINS *pins; /* must be allocated from lockman's pinbox */
+ struct lockman_lock *all_locks; /* a LIFO */
LOCK_OWNER *waiting_for;
pthread_cond_t *cond; /* transactions waiting for this, wait on 'cond' */
pthread_mutex_t *mutex; /* mutex is required to use 'cond' */