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:
authorMark Salter <msalter@redhat.com>2002-01-24 16:32:46 +0300
committerMark Salter <msalter@redhat.com>2002-01-24 16:32:46 +0300
commit54542d8a29e46b37e20bf99eafa442eb405c2cbd (patch)
tree1b3bb8c13d37216034d7809fe172d55e3899672d /libgloss/arm
parent993c684df7521d1502d15742ecc0774807b005aa (diff)
(_times): Unconditionally use SYS_times.
(__get_memtop): New funtion to return top of memory.
Diffstat (limited to 'libgloss/arm')
-rw-r--r--libgloss/arm/redboot-syscalls.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/libgloss/arm/redboot-syscalls.c b/libgloss/arm/redboot-syscalls.c
index 6b9d550c1..1b990ffb2 100644
--- a/libgloss/arm/redboot-syscalls.c
+++ b/libgloss/arm/redboot-syscalls.c
@@ -1,7 +1,7 @@
/*
* redboot-syscalls.c -- provide system call support for RedBoot
*
- * Copyright (c) 1997, 2001 Cygnus Support
+ * Copyright (c) 1997, 2001, 2002 Red Hat, Inc.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
@@ -175,14 +175,10 @@ clock_t
_times(struct tms * tp)
{
clock_t utime;
-#ifdef HAVE_BSP_CLOCK
int err;
- err = __syscall(SYS_utime, &utime);
+ err = __syscall(SYS_times, &utime);
if (err)
utime = 0;
-#else
- utime = 0;
-#endif
if (tp) {
tp->tms_utime = utime;
@@ -201,3 +197,15 @@ _unlink (const char *pathname)
return -1;
}
+
+#define SYS_meminfo 1001
+
+void *
+__get_memtop(void)
+{
+ unsigned long totmem = 0, topmem = 0;
+ int numbanks;
+
+ __syscall(SYS_meminfo, (unsigned long)&totmem, (unsigned long)&topmem, 0);
+ return (void*)topmem;
+}