Commit 9a73af01 authored by Jan Lindström's avatar Jan Lindström Committed by GitHub

Merge pull request #388 from grooverdan/10.2-MDEV-8684-innobase-remove-maths

MDEV-8684: innodb ut_delay - no maths
parents b246993c 015966d2
......@@ -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