mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +00:00
- rename sleep to delayExecution
- delayExecution accepts the value now in seconds - should fix the linux crash svn path=/trunk/; revision=28831
This commit is contained in:
parent
0c92f06002
commit
9b5863ddfb
3 changed files with 25 additions and 9 deletions
|
@ -87,9 +87,9 @@ namespace System_
|
||||||
free(cmd);
|
free(cmd);
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
void OsSupport::sleep(long value)
|
void OsSupport::delayExecution(long value)
|
||||||
{
|
{
|
||||||
Sleep(value);
|
Sleep(value * 1000);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/********************************************************************************************************************/
|
/********************************************************************************************************************/
|
||||||
|
@ -124,9 +124,9 @@ namespace System_
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OsSupport::sleep(long value)
|
void OsSupport::delayExecution(long value)
|
||||||
{
|
{
|
||||||
sleep(value);
|
sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,16 @@ namespace System_
|
||||||
|
|
||||||
static bool terminateProcess(ProcessID pid);
|
static bool terminateProcess(ProcessID pid);
|
||||||
|
|
||||||
static void sleep(long value);
|
|
||||||
|
//----------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
/// delayExecution
|
||||||
|
///
|
||||||
|
/// Description: this function sleeps the current process for the amount given in seconds
|
||||||
|
///
|
||||||
|
/// @param sec amount of seconds to sleep
|
||||||
|
|
||||||
|
static void delayExecution(long sec);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace Sysreg_
|
||||||
/// delay reading until emulator is ready
|
/// delay reading until emulator is ready
|
||||||
///
|
///
|
||||||
|
|
||||||
OsSupport::sleep(m_DelayRead);
|
OsSupport::delayExecution(m_DelayRead);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
|
@ -600,7 +600,7 @@ namespace Sysreg_
|
||||||
void RosBootTest::cleanup()
|
void RosBootTest::cleanup()
|
||||||
{
|
{
|
||||||
m_DataSource->closeSource();
|
m_DataSource->closeSource();
|
||||||
OsSupport::sleep(3 * CLOCKS_PER_SEC);
|
OsSupport::delayExecution(3);
|
||||||
|
|
||||||
if (m_Pid)
|
if (m_Pid)
|
||||||
{
|
{
|
||||||
|
@ -650,7 +650,7 @@ namespace Sysreg_
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef __LINUX__
|
#ifndef __LINUX__
|
||||||
OsSupport::sleep(500);
|
OsSupport::delayExecution(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert(m_DataSource != 0);
|
assert(m_DataSource != 0);
|
||||||
|
@ -660,9 +660,16 @@ namespace Sysreg_
|
||||||
cleanup();
|
cleanup();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
OsSupport::sleep(1000);
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
|
|
||||||
|
OsSupport::delayExecution(3);
|
||||||
|
/*
|
||||||
|
* For linux systems we can only
|
||||||
|
* check if the emulator runs by
|
||||||
|
* opening pid.txt and lookthrough if
|
||||||
|
* it exists
|
||||||
|
*/
|
||||||
|
|
||||||
FILE * file = fopen(m_PidFile.c_str(), "r");
|
FILE * file = fopen(m_PidFile.c_str(), "r");
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue