Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-12-01 02:37:14 +0300
committerJeff Johnston <jjohnstn@redhat.com>2005-12-01 02:37:14 +0300
commit7c15164f1772f7b0e093ff5dd1027051cddc764a (patch)
tree66b1a8fe4d12caf0f7c3fc1fe40559be5a7cd943 /libgloss/arm/syscalls.c
parent1740d2580bf09d3451e55d3762ae63f71e10852f (diff)
2005-11-30 Shaun Jackman <sjackman@gmail.com>
* arm/libcfunc.c (clock, sleep, usleep): New functions. * arm/syscalls.c (_clock): New function. (_times): Call _clock.
Diffstat (limited to 'libgloss/arm/syscalls.c')
-rw-r--r--libgloss/arm/syscalls.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c
index 2701bb87a..456b68129 100644
--- a/libgloss/arm/syscalls.c
+++ b/libgloss/arm/syscalls.c
@@ -31,6 +31,7 @@ int _getpid _PARAMS ((int));
int _kill _PARAMS ((int, int));
void _exit _PARAMS ((int));
int _close _PARAMS ((int));
+clock_t _clock _PARAMS ((void));
int _swiclose _PARAMS ((int));
int _open _PARAMS ((const char *, int, ...));
int _swiopen _PARAMS ((const char *, int));
@@ -597,7 +598,7 @@ _gettimeofday (struct timeval * tp, struct timezone * tzp)
/* Return a clock that ticks at 100Hz. */
clock_t
-_times (struct tms * tp)
+_clock (void)
{
clock_t timeval;
@@ -606,6 +607,14 @@ _times (struct tms * tp)
#else
asm ("swi %a1; mov %0, r0" : "=r" (timeval): "i" (SWI_Clock) : "r0");
#endif
+ return timeval;
+}
+
+/* Return a clock that ticks at 100Hz. */
+clock_t
+_times (struct tms * tp)
+{
+ clock_t timeval = _clock();
if (tp)
{