mdbx: add mdbx_osal_jitter() and mdbx_jitter4testing().

This commit is contained in:
Leo Yuriev
2017-04-27 15:18:33 +03:00
parent 40dee6f05f
commit 7204c46421
4 changed files with 36 additions and 13 deletions

View File

@@ -24,19 +24,6 @@
* LY
*/
static __inline void jitter4testing(void) {
#ifndef NDEBUG
for (;;) {
unsigned coin = ((unsigned)__rdtsc() * 277u) % 43u;
if (coin < 43 / 3)
break;
SwitchToThread();
if (coin > 43 * 2 / 3)
Sleep(1);
}
#endif
}
/*----------------------------------------------------------------------------*/
/* rthc */