[rtems commit] psxtmtests: Use timeout in more distant future
Sebastian Huber
sebh at rtems.org
Tue Mar 31 13:16:50 UTC 2015
Module: rtems
Branch: master
Commit: 2da28d2bee8640eb5563ca4f086117a8ac300093
Changeset: http://git.rtems.org/rtems/commit/?id=2da28d2bee8640eb5563ca4f086117a8ac300093
Author: Alexander Krutwig <alexander.krutwig at embedded-brains.de>
Date: Tue Mar 31 15:14:28 2015 +0200
psxtmtests: Use timeout in more distant future
Adds future compatibility with strict monontonic software timestamps.
---
testsuites/psxtmtests/psxtmcond08/init.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/testsuites/psxtmtests/psxtmcond08/init.c b/testsuites/psxtmtests/psxtmcond08/init.c
index 8af9f9d..2224f23 100644
--- a/testsuites/psxtmtests/psxtmcond08/init.c
+++ b/testsuites/psxtmtests/psxtmcond08/init.c
@@ -85,7 +85,9 @@ void *Middle(
rtems_test_assert( rc == 0 );
#elif defined(USE_TIMEDWAIT_WITH_VALUE)
-
+ /* adjust sleepTime to get something obviously in the future */
+ ++sleepTime.tv_sec;
+
rc = pthread_cond_timedwait( &CondID, &MutexID, &sleepTime );
rtems_test_assert( rc == 0 );
@@ -133,7 +135,6 @@ void *POSIX_Init(
/* Convert from timeval to timespec */
sleepTime.tv_sec = tp.tv_sec;
sleepTime.tv_nsec = tp.tv_usec * 1000;
- sleepTime.tv_nsec += 1;
rc = pthread_cond_init(&CondID, NULL);
rtems_test_assert( rc == 0 );
More information about the vc
mailing list