~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to storage/innobase/include/sync0sync.h

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        mutex_t*        mutex,          /* in: pointer to mutex */
115
115
        const char*     file_name,      /* in: file name where locked */
116
116
        ulint           line);          /* in: line where locked */
 
117
/******************************************************************
 
118
NOTE! The following macro should be used in mutex locking, not the
 
119
corresponding function. */
 
120
 
 
121
#define mutex_enter_nowait(M)   \
 
122
        mutex_enter_nowait_func((M), __FILE__, __LINE__)
117
123
/************************************************************************
118
 
Tries to lock the mutex for the current thread. If the lock is not acquired
119
 
immediately, returns with return value 1. */
 
124
NOTE! Use the corresponding macro in the header file, not this function
 
125
directly. Tries to lock the mutex for the current thread. If the lock is not
 
126
acquired immediately, returns with return value 1. */
120
127
 
121
128
ulint
122
 
mutex_enter_nowait(
123
 
/*===============*/
 
129
mutex_enter_nowait_func(
 
130
/*====================*/
124
131
                                        /* out: 0 if succeed, 1 if not */
125
132
        mutex_t*        mutex,          /* in: pointer to mutex */
126
133
        const char*     file_name,      /* in: file name where mutex
170
177
ibool
171
178
mutex_validate(
172
179
/*===========*/
173
 
        mutex_t*        mutex);
 
180
        const mutex_t*  mutex);
 
181
/**********************************************************************
 
182
Checks that the current thread owns the mutex. Works only
 
183
in the debug version. */
 
184
 
 
185
ibool
 
186
mutex_own(
 
187
/*======*/
 
188
                                /* out: TRUE if owns */
 
189
        const mutex_t*  mutex); /* in: mutex */
174
190
#endif /* UNIV_DEBUG */
175
191
#ifdef UNIV_SYNC_DEBUG
176
192
/**********************************************************************
215
231
                                        also purge_is_running mutex is
216
232
                                        allowed */
217
233
/**********************************************************************
218
 
Checks that the current thread owns the mutex. Works only
219
 
in the debug version. */
220
 
 
221
 
ibool
222
 
mutex_own(
223
 
/*======*/
224
 
                                /* out: TRUE if owns */
225
 
        mutex_t*        mutex); /* in: mutex */
226
 
/**********************************************************************
227
234
Gets the debug information for a reserved mutex. */
228
235
 
229
236
void
248
255
ulint
249
256
mutex_get_lock_word(
250
257
/*================*/
251
 
        mutex_t*        mutex); /* in: mutex */
 
258
        const mutex_t*  mutex); /* in: mutex */
252
259
#ifdef UNIV_SYNC_DEBUG
253
260
/**********************************************************************
254
261
NOT to be used outside this module except in debugging! Gets the waiters
258
265
mutex_get_waiters(
259
266
/*==============*/
260
267
                                /* out: value to set */
261
 
        mutex_t*        mutex); /* in: mutex */
 
268
        const mutex_t*  mutex); /* in: mutex */
262
269
#endif /* UNIV_SYNC_DEBUG */
263
270
 
264
271
/*
479
486
#ifdef UNIV_SYNC_DEBUG
480
487
        const char*     file_name;      /* File where the mutex was locked */
481
488
        ulint   line;           /* Line where the mutex was locked */
482
 
        os_thread_id_t thread_id; /* Debug version: The thread id of the
483
 
                                thread which locked the mutex. */
484
489
        ulint   level;          /* Level in the global latching order */
485
490
#endif /* UNIV_SYNC_DEBUG */
486
491
        const char*     cfile_name;/* File name where mutex created */
487
492
        ulint           cline;  /* Line where created */
488
493
#ifdef UNIV_DEBUG
 
494
        os_thread_id_t thread_id; /* The thread id of the thread
 
495
                                which locked the mutex. */
489
496
        ulint           magic_n;
490
497
# define MUTEX_MAGIC_N  (ulint)979585
491
498
#endif /* UNIV_DEBUG */