~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to storage/innobase/sync/sync0rw.c

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
        lock->last_x_file_name = "not yet reserved";
152
152
        lock->last_s_line = 0;
153
153
        lock->last_x_line = 0;
 
154
        lock->event = os_event_create(NULL);
 
155
 
 
156
#ifdef __WIN__
 
157
        lock->wait_ex_event = os_event_create(NULL);
 
158
#endif
154
159
 
155
160
        mutex_enter(&rw_lock_list_mutex);
156
161
 
184
189
        mutex_free(rw_lock_get_mutex(lock));
185
190
 
186
191
        mutex_enter(&rw_lock_list_mutex);
 
192
        os_event_free(lock->event);
 
193
 
 
194
#ifdef __WIN__
 
195
        os_event_free(lock->wait_ex_event);
 
196
#endif
187
197
 
188
198
        if (UT_LIST_GET_PREV(list, lock)) {
189
199
                ut_a(UT_LIST_GET_PREV(list, lock)->magic_n == RW_LOCK_MAGIC_N);
544
554
        rw_x_system_call_count++;
545
555
 
546
556
        sync_array_reserve_cell(sync_primary_wait_array,
547
 
                                lock, RW_LOCK_EX,
 
557
                                lock,
 
558
#ifdef __WIN__
 
559
                                /* On windows RW_LOCK_WAIT_EX signifies
 
560
                                that this thread should wait on the
 
561
                                special wait_ex_event. */
 
562
                                (state == RW_LOCK_WAIT_EX)
 
563
                                 ? RW_LOCK_WAIT_EX :
 
564
#endif
 
565
                                RW_LOCK_EX,
548
566
                                file_name, line,
549
567
                                &index);
550
568