summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/testsupport/test.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-29 14:36:26 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-29 14:36:58 +0200
commit7f7a3e8f70c46a2a5a5ef120909c8211840ef5cb (patch)
tree2614cd84957853a7b1c919c9bc304a5bfc65fbcb /cpukit/libmisc/testsupport/test.h
parentscore: Add RTEMS_NO_INLINE (diff)
downloadrtems-7f7a3e8f70c46a2a5a5ef120909c8211840ef5cb.tar.bz2
tests: Move busy loop to test support
Update #3056.
Diffstat (limited to 'cpukit/libmisc/testsupport/test.h')
-rw-r--r--cpukit/libmisc/testsupport/test.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/cpukit/libmisc/testsupport/test.h b/cpukit/libmisc/testsupport/test.h
index a32e2c42c1..d9ac6caf91 100644
--- a/cpukit/libmisc/testsupport/test.h
+++ b/cpukit/libmisc/testsupport/test.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -260,6 +260,22 @@ void rtems_test_parallel(
size_t job_count
);
+/**
+ * @brief Performs a busy loop with the specified iteration count.
+ *
+ * This function is optimized to not perform memory accesses and should have a
+ * small jitter.
+ *
+ * @param[in] count The iteration count.
+ */
+void rtems_test_busy(uint_fast32_t count);
+
+/**
+ * @brief Returns a count value for rtems_test_busy() which yields roughly a
+ * duration of one clock tick.
+ */
+uint_fast32_t rtems_test_get_one_tick_busy_count(void);
+
/** @} */
#ifdef __cplusplus