summaryrefslogtreecommitdiff
path: root/innobase/sync/sync0arr.c
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-08-06 22:59:13 +0300
committerunknown <heikki@hundin.mysql.fi>2002-08-06 22:59:13 +0300
commita3edc742b94a94ff455ff549d7e2a9f5faa346a0 (patch)
tree0ed7a5d28436450a6e79787357c337dfae761d1d /innobase/sync/sync0arr.c
parentcbb0dc14ccd3ff932edf5a29aa6af0ac210be4b9 (diff)
downloadmariadb-git-a3edc742b94a94ff455ff549d7e2a9f5faa346a0.tar.gz
Many files:
Merge InnoDB-3.23.52d innobase/btr/btr0sea.c: Merge InnoDB-3.23.52d innobase/buf/buf0buf.c: Merge InnoDB-3.23.52d innobase/buf/buf0lru.c: Merge InnoDB-3.23.52d innobase/include/buf0buf.h: Merge InnoDB-3.23.52d innobase/include/ha0ha.h: Merge InnoDB-3.23.52d innobase/include/log0log.h: Merge InnoDB-3.23.52d innobase/include/os0file.h: Merge InnoDB-3.23.52d innobase/include/os0thread.h: Merge InnoDB-3.23.52d innobase/include/ha0ha.ic: Merge InnoDB-3.23.52d innobase/include/os0sync.ic: Merge InnoDB-3.23.52d innobase/include/srv0start.h: Merge InnoDB-3.23.52d innobase/include/sync0rw.ic: Merge InnoDB-3.23.52d innobase/include/sync0sync.ic: Merge InnoDB-3.23.52d innobase/include/ut0dbg.h: Merge InnoDB-3.23.52d innobase/include/univ.i: Merge InnoDB-3.23.52d innobase/lock/lock0lock.c: Merge InnoDB-3.23.52d innobase/log/log0log.c: Merge InnoDB-3.23.52d innobase/mem/mem0pool.c: Merge InnoDB-3.23.52d innobase/os/os0file.c: Merge InnoDB-3.23.52d innobase/os/os0thread.c: Merge InnoDB-3.23.52d innobase/srv/srv0srv.c: Merge InnoDB-3.23.52d innobase/srv/srv0start.c: Merge InnoDB-3.23.52d innobase/sync/sync0arr.c: Merge InnoDB-3.23.52d innobase/sync/sync0rw.c: Merge InnoDB-3.23.52d innobase/sync/sync0sync.c: Merge InnoDB-3.23.52d innobase/thr/thr0loc.c: Merge InnoDB-3.23.52d innobase/trx/trx0trx.c: Merge InnoDB-3.23.52d innobase/configure.in: Merge InnoDB-3.23.52d sql/ha_innobase.cc: Merge InnoDB-3.23.52d
Diffstat (limited to 'innobase/sync/sync0arr.c')
-rw-r--r--innobase/sync/sync0arr.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/innobase/sync/sync0arr.c b/innobase/sync/sync0arr.c
index 81b5b7de195..ad3ac84b6eb 100644
--- a/innobase/sync/sync0arr.c
+++ b/innobase/sync/sync0arr.c
@@ -454,7 +454,7 @@ sync_array_cell_print(
buf += sprintf(buf,
"--Thread %lu has waited at %s line %lu for %.2f seconds the semaphore:\n",
- (ulint)cell->thread, cell->file, cell->line,
+ os_thread_pf(cell->thread), cell->file, cell->line,
difftime(time(NULL), cell->reservation_time));
if (type == SYNC_MUTEX) {
@@ -486,7 +486,7 @@ sync_array_cell_print(
if (rwlock->writer != RW_LOCK_NOT_LOCKED) {
buf += sprintf(buf,
"a writer (thread id %lu) has reserved it in mode",
- (ulint)rwlock->writer_thread);
+ os_thread_pf(rwlock->writer_thread));
if (rwlock->writer == RW_LOCK_EX) {
buf += sprintf(buf, " exclusive\n");
} else {
@@ -535,8 +535,8 @@ sync_array_find_thread(
cell = sync_array_get_nth_cell(arr, i);
- if ((cell->wait_object != NULL)
- && (cell->thread == thread)) {
+ if (cell->wait_object != NULL
+ && os_thread_eq(cell->thread, thread)) {
return(cell); /* Found */
}
@@ -651,9 +651,9 @@ sync_array_detect_deadlock(
sync_array_cell_print(buf, cell);
printf(
"Mutex %lx owned by thread %lu file %s line %lu\n%s",
- (ulint)mutex, mutex->thread_id,
- mutex->file_name, mutex->line,
- buf);
+ (ulint)mutex, os_thread_pf(mutex->thread_id),
+ mutex->file_name, mutex->line, buf);
+
return(TRUE);
}
}
@@ -671,9 +671,9 @@ sync_array_detect_deadlock(
thread = debug->thread_id;
if (((debug->lock_type == RW_LOCK_EX)
- && (thread != cell->thread))
+ && !os_thread_eq(thread, cell->thread))
|| ((debug->lock_type == RW_LOCK_WAIT_EX)
- && (thread != cell->thread))
+ && !os_thread_eq(thread, cell->thread))
|| (debug->lock_type == RW_LOCK_SHARED)) {
/* The (wait) x-lock request can block infinitely
@@ -771,7 +771,7 @@ sync_arr_cell_can_wake_up(
if (rw_lock_get_reader_count(lock) == 0
&& rw_lock_get_writer(lock) == RW_LOCK_WAIT_EX
- && lock->writer_thread == cell->thread) {
+ && os_thread_eq(lock->writer_thread, cell->thread)) {
return(TRUE);
}
@@ -927,7 +927,7 @@ sync_array_print_long_waits(void)
&& difftime(time(NULL), cell->reservation_time) > 420) {
fprintf(stderr,
-"InnoDB: Error: semaphore wait has lasted > 420 seconds\n"
+"InnoDB: Error: semaphore wait has lasted > 600 seconds\n"
"InnoDB: We intentionally crash the server, because it appears to be hung.\n"
);
@@ -1011,3 +1011,4 @@ sync_array_print_info(
sync_array_exit(arr);
}
+