OSDN Git Service

2010-07-23 Naveen.H.S <naveenh1@kpitcummins.com>
[pf3gnuchains/sourceware.git] / libgloss / v850 / gettime.c
diff --git a/libgloss/v850/gettime.c b/libgloss/v850/gettime.c
new file mode 100644 (file)
index 0000000..fc47532
--- /dev/null
@@ -0,0 +1,17 @@
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "sys/syscall.h"
+#include "sys/time.h"
+
+int errno;
+
+int __trap0 (int function, int p1, int p2, int p3);
+
+#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
+
+int
+_gettimeofday (struct timeval *tp, void *tzp)
+{
+  return TRAP0 (SYS_gettimeofday, tp, tzp, 0);
+}