~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2008-09-04 19:31:00 UTC
  • Revision ID: brian@tangent.org-20080904193100-l849hgghfy4urj43
Changing default character set from this point on.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
/**********************************************************************
20
20
Sets the waiters field in a mutex. */
21
 
UNIV_INTERN
 
21
 
22
22
void
23
23
mutex_set_waiters(
24
24
/*==============*/
28
28
Reserves a mutex for the current thread. If the mutex is reserved, the
29
29
function spins a preset time (controlled by SYNC_SPIN_ROUNDS) waiting
30
30
for the mutex before suspending the thread. */
31
 
UNIV_INTERN
 
31
 
32
32
void
33
33
mutex_spin_wait(
34
34
/*============*/
39
39
#ifdef UNIV_SYNC_DEBUG
40
40
/**********************************************************************
41
41
Sets the debug information for a reserved mutex. */
42
 
UNIV_INTERN
 
42
 
43
43
void
44
44
mutex_set_debug_info(
45
45
/*=================*/
49
49
#endif /* UNIV_SYNC_DEBUG */
50
50
/**********************************************************************
51
51
Releases the threads waiting in the primary wait array for this mutex. */
52
 
UNIV_INTERN
 
52
 
53
53
void
54
54
mutex_signal_object(
55
55
/*================*/
197
197
{
198
198
        ut_ad(mutex_own(mutex));
199
199
 
200
 
        ut_d(mutex->thread_id = (os_thread_id_t) ULINT_UNDEFINED);
 
200
        ut_d(mutex->thread_id = ULINT_UNDEFINED);
201
201
 
202
202
#ifdef UNIV_SYNC_DEBUG
203
203
        sync_thread_reset_level(mutex);
211
211
        perform the read first, which could leave a waiting
212
212
        thread hanging indefinitely.
213
213
 
214
 
        Our current solution call every second
 
214
        Our current solution call every 10 seconds
215
215
        sync_arr_wake_threads_if_sema_free()
216
216
        to wake up possible hanging threads if
217
217
        they are missed in mutex_signal_object. */