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
3d1a7cba
Commit
3d1a7cba
authored
Mar 30, 2016
by
Sergey Vojtovich
Committed by
Daniel Black
Mar 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8684: Remove delaying maths in ut_delay
Also introduce compiler barrier properly on all architectures.
parent
d4ba5047
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
18 deletions
+14
-18
storage/innobase/include/ut0ut.h
storage/innobase/include/ut0ut.h
+4
-2
storage/innobase/ut/ut0ut.cc
storage/innobase/ut/ut0ut.cc
+3
-7
storage/xtradb/include/ut0ut.h
storage/xtradb/include/ut0ut.h
+4
-2
storage/xtradb/ut/ut0ut.cc
storage/xtradb/ut/ut0ut.cc
+3
-7
No files found.
storage/innobase/include/ut0ut.h
View file @
3d1a7cba
...
...
@@ -89,9 +89,11 @@ struct ut_when_dtor {
independent way by using YieldProcessor. */
# define UT_RELAX_CPU() YieldProcessor()
# else
# define UT_RELAX_CPU()
__asm__ __volatile__ ("":::"memory")
# define UT_RELAX_CPU()
((void)0)
/* avoid warning for an empty statement */
# endif
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
...
...
@@ -345,7 +347,7 @@ Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++.
@return dummy value */
UNIV_INTERN
ulint
void
ut_delay
(
/*=====*/
ulint
delay
);
/*!< in: delay in microseconds on 100 MHz Pentium */
...
...
storage/innobase/ut/ut0ut.cc
View file @
3d1a7cba
...
...
@@ -394,25 +394,21 @@ Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++.
@return dummy value */
UNIV_INTERN
ulint
void
ut_delay
(
/*=====*/
ulint
delay
)
/*!< in: delay in microseconds on 100 MHz Pentium */
{
ulint
i
,
j
;
ulint
i
;
UT_LOW_PRIORITY_CPU
();
j
=
0
;
for
(
i
=
0
;
i
<
delay
*
50
;
i
++
)
{
j
+=
i
;
UT_RELAX_CPU
();
UT_COMPILER_BARRIER
();
}
UT_RESUME_PRIORITY_CPU
();
return
(
j
);
}
#endif
/* !UNIV_HOTBACKUP */
...
...
storage/xtradb/include/ut0ut.h
View file @
3d1a7cba
...
...
@@ -86,9 +86,11 @@ struct ut_when_dtor {
independent way by using YieldProcessor. */
# define UT_RELAX_CPU() YieldProcessor()
# else
# define UT_RELAX_CPU()
__asm__ __volatile__ ("":::"memory")
# define UT_RELAX_CPU()
((void)0)
/* avoid warning for an empty statement */
# endif
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
...
...
@@ -337,7 +339,7 @@ Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++.
@return dummy value */
UNIV_INTERN
ulint
void
ut_delay
(
/*=====*/
ulint
delay
);
/*!< in: delay in microseconds on 100 MHz Pentium */
...
...
storage/xtradb/ut/ut0ut.cc
View file @
3d1a7cba
...
...
@@ -395,25 +395,21 @@ Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++.
@return dummy value */
UNIV_INTERN
ulint
void
ut_delay
(
/*=====*/
ulint
delay
)
/*!< in: delay in microseconds on 100 MHz Pentium */
{
ulint
i
,
j
;
ulint
i
;
UT_LOW_PRIORITY_CPU
();
j
=
0
;
for
(
i
=
0
;
i
<
delay
*
50
;
i
++
)
{
j
+=
i
;
UT_RELAX_CPU
();
UT_COMPILER_BARRIER
();
}
UT_RESUME_PRIORITY_CPU
();
return
(
j
);
}
#endif
/* !UNIV_HOTBACKUP */
...
...
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