It's only used by test.c and probably isn't something that should be
exposed for general use (it just calls gettimeofday).
This is also useful for ARM, which doesn't use math.c, where this used
to live.
Signed-off-by: Thomas Leonard <talex5@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
(void)__qdivrem(ua, ub, &ur);
return (neg ? -ur : ur);
}
-
-#ifndef HAVE_LIBC
-/* Should be random enough for our uses */
-int rand(void)
-{
- static unsigned int previous;
- struct timeval tv;
- gettimeofday(&tv, NULL);
- previous += tv.tv_sec + tv.tv_usec;
- previous *= RAND_MIX;
- return previous;
-}
-#endif
}
#endif
+#ifndef HAVE_LIBC
+/* Should be random enough for our uses */
+int rand(void)
+{
+ static unsigned int previous;
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ previous += tv.tv_sec + tv.tv_usec;
+ previous *= RAND_MIX;
+ return previous;
+}
+#endif
+
static void periodic_thread(void *p)
{
struct timeval tv;