Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e6765fdc
Commit
e6765fdc
authored
Apr 04, 2001
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync0sync.c Fix the infinite spin on FreeBSD
os0thread.c Use pthread_yield instead of os_thread_sleep(0)
parent
09fa56ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-4
innobase/os/os0thread.c
innobase/os/os0thread.c
+1
-1
innobase/sync/sync0sync.c
innobase/sync/sync0sync.c
+9
-0
No files found.
BitKeeper/etc/logging_ok
View file @
e6765fdc
mwagner@evoq.mwagner.org
jcole@abel.spaceapes.com
monty@donna.mysql.fi
sasha@mysql.sashanet.com
heikki@donna.mysql.fi
innobase/os/os0thread.c
View file @
e6765fdc
...
...
@@ -122,7 +122,7 @@ os_thread_yield(void)
#ifdef __WIN__
Sleep
(
0
);
#else
os_thread_sleep
(
0
);
pthread_yield
(
);
#endif
}
...
...
innobase/sync/sync0sync.c
View file @
e6765fdc
...
...
@@ -366,6 +366,15 @@ mutex_spin_wait(
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment