Commit 015966d2 authored by Daniel Black's avatar Daniel Black

MDEV-8684: innodb ut_delay - no maths

Reintroduce 3d1a7cba
that removed the maths from ut_delay.

Existing definitions of UT_COMPILE_BARRIER used.
Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
parent 3f5a8cbe
......@@ -313,7 +313,7 @@ ut_sprintf_timestamp(
Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++.
@return dummy value */
ulint
void
ut_delay(
/*=====*/
ulint delay); /*!< in: delay in microseconds on 100 MHz Pentium */
......
......@@ -285,26 +285,21 @@ ut_sprintf_timestamp(
Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++.
@return dummy value */
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);
}
/*************************************************************//**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment