~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/lock/lock0iter.c

  • Committer: Monty Taylor
  • Date: 2009-08-12 06:25:19 UTC
  • mto: (1114.1.1 innodb-plugin-merge)
  • mto: This revision was merged to the branch mainline in revision 1183.
  • Revision ID: mordred@inaugust.com-20090812062519-cij02mrrunvnxblt
Tags: innodb-plugin-1.0.4
InnoDB Plugin 1.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
*****************************************************************************/
18
18
 
19
 
/******************************************************
 
19
/**************************************************//**
 
20
@file lock/lock0iter.c
20
21
Lock queue iterator. Can iterate over table and record
21
22
lock queues.
22
23
 
35
36
# include "srv0srv.h" /* kernel_mutex */
36
37
#endif /* UNIV_DEBUG */
37
38
 
38
 
/***********************************************************************
 
39
/*******************************************************************//**
39
40
Initialize lock queue iterator so that it starts to iterate from
40
41
"lock". bit_no specifies the record number within the heap where the
41
42
record is stored. It can be undefined (ULINT_UNDEFINED) in two cases:
48
49
void
49
50
lock_queue_iterator_reset(
50
51
/*======================*/
51
 
        lock_queue_iterator_t*  iter,   /* out: iterator */
52
 
        const lock_t*           lock,   /* in: lock to start from */
53
 
        ulint                   bit_no) /* in: record number in the
 
52
        lock_queue_iterator_t*  iter,   /*!< out: iterator */
 
53
        const lock_t*           lock,   /*!< in: lock to start from */
 
54
        ulint                   bit_no) /*!< in: record number in the
54
55
                                        heap */
55
56
{
56
57
        ut_ad(mutex_own(&kernel_mutex));
76
77
        }
77
78
}
78
79
 
79
 
/***********************************************************************
 
80
/*******************************************************************//**
80
81
Gets the previous lock in the lock queue, returns NULL if there are no
81
82
more locks (i.e. the current lock is the first one). The iterator is
82
 
receded (if not-NULL is returned). */
 
83
receded (if not-NULL is returned).
 
84
@return previous lock or NULL */
83
85
UNIV_INTERN
84
86
const lock_t*
85
87
lock_queue_iterator_get_prev(
86
88
/*=========================*/
87
 
                                        /* out: previous lock or NULL */
88
 
        lock_queue_iterator_t*  iter)   /* in/out: iterator */
 
89
        lock_queue_iterator_t*  iter)   /*!< in/out: iterator */
89
90
{
90
91
        const lock_t*   prev_lock;
91
92