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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
heikki@donna.mysql.fi
jcole@abel.spaceapes.com
monty@donna.mysql.fi
sasha@mysql.sashanet.com
innobase/os/os0thread.c
View file @
e6765fdc
...
@@ -122,7 +122,7 @@ os_thread_yield(void)
...
@@ -122,7 +122,7 @@ os_thread_yield(void)
#ifdef __WIN__
#ifdef __WIN__
Sleep
(
0
);
Sleep
(
0
);
#else
#else
os_thread_sleep
(
0
);
pthread_yield
(
);
#endif
#endif
}
}
...
...
innobase/sync/sync0sync.c
View file @
e6765fdc
...
@@ -366,6 +366,15 @@ spin_loop:
...
@@ -366,6 +366,15 @@ spin_loop:
return
;
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
)
{
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