23 lines
513 B
C

#include "platform.h"
#include <unistd.h>
#ifndef ITERATIONS
#define ITERATIONS 20000
#endif
/* The functions in this file are only meant to support Dhrystone on an
* embedded RV32 system and are obviously incorrect in general. */
long time(void) { return get_timer_value(); }
// set the number of dhrystone iterations
void __wrap_scanf(const char *fmt, int *n) { *n = ITERATIONS; }
// extern volatile uint64_t tohost;
void exit(int n) {
// tohost = 0x1;
write_hex(STDERR_FILENO, 1);
for (;;)
;
}