Author: janderwald
Date: Tue Sep 4 13:36:00 2007
New Revision: 28831
URL:
http://svn.reactos.org/svn/reactos?rev=28831&view=rev
Log:
- rename sleep to delayExecution
- delayExecution accepts the value now in seconds
- should fix the linux crash
Modified:
trunk/reactos/tools/sysreg/os_support.cpp
trunk/reactos/tools/sysreg/os_support.h
trunk/reactos/tools/sysreg/rosboot_test.cpp
Modified: trunk/reactos/tools/sysreg/os_support.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/os_support.cp…
==============================================================================
--- trunk/reactos/tools/sysreg/os_support.cpp (original)
+++ trunk/reactos/tools/sysreg/os_support.cpp Tue Sep 4 13:36:00 2007
@@ -87,9 +87,9 @@
free(cmd);
return pid;
}
- void OsSupport::sleep(long value)
+ void OsSupport::delayExecution(long value)
{
- Sleep(value);
+ Sleep(value * 1000);
}
#else
/********************************************************************************************************************/
@@ -124,9 +124,9 @@
return true;
}
- void OsSupport::sleep(long value)
+ void OsSupport::delayExecution(long value)
{
- sleep(value);
+ sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC );
}
Modified: trunk/reactos/tools/sysreg/os_support.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/os_support.h?…
==============================================================================
--- trunk/reactos/tools/sysreg/os_support.h (original)
+++ trunk/reactos/tools/sysreg/os_support.h Tue Sep 4 13:36:00 2007
@@ -77,7 +77,16 @@
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:
//---------------------------------------------------------------------------------------
Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
==============================================================================
--- trunk/reactos/tools/sysreg/rosboot_test.cpp (original)
+++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Sep 4 13:36:00 2007
@@ -94,7 +94,7 @@
/// delay reading until emulator is ready
///
- OsSupport::sleep(m_DelayRead);
+ OsSupport::delayExecution(m_DelayRead);
}
}
//---------------------------------------------------------------------------------------
@@ -600,7 +600,7 @@
void RosBootTest::cleanup()
{
m_DataSource->closeSource();
- OsSupport::sleep(3 * CLOCKS_PER_SEC);
+ OsSupport::delayExecution(3);
if (m_Pid)
{
@@ -650,7 +650,7 @@
}
#endif
#ifndef __LINUX__
- OsSupport::sleep(500);
+ OsSupport::delayExecution(1);
#endif
assert(m_DataSource != 0);
@@ -660,8 +660,15 @@
cleanup();
return false;
}
- OsSupport::sleep(1000);
#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");
if (!file)