diff options
-rw-r--r-- | BitKeeper/etc/logging_ok | 5 | ||||
-rw-r--r-- | innobase/os/os0thread.c | 2 | ||||
-rw-r--r-- | innobase/sync/sync0sync.c | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index f7dff25bc24..1c3bdac2b9f 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -1,4 +1 @@ -mwagner@evoq.mwagner.org -jcole@abel.spaceapes.com -monty@donna.mysql.fi -sasha@mysql.sashanet.com +heikki@donna.mysql.fi diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c index 2664d574122..c1519ac58e4 100644 --- a/innobase/os/os0thread.c +++ b/innobase/os/os0thread.c @@ -122,7 +122,7 @@ os_thread_yield(void) #ifdef __WIN__ Sleep(0); #else - os_thread_sleep(0); + pthread_yield(); #endif } diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c index b98b22dd90b..a27dc74c2fb 100644 --- a/innobase/sync/sync0sync.c +++ b/innobase/sync/sync0sync.c @@ -366,6 +366,15 @@ spin_loop: return; } + + /* We may end up with a situation where lock_word is + 0 but the OS fast mutex is still reserved. On FreeBSD + the OS does not seem to schedule a thread which is constantly + calling pthread_mutex_trylock (in mutex_test_and_set + implementation). Then we could end up spinning here indefinitely. + The following 'i++' stops this infinite spin. */ + + i++; if (i < SYNC_SPIN_ROUNDS) { |