From ce4654708cc111c6eff691d1e564e3fb5b64eb17 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 18 Jul 2005 16:18:17 +0000 Subject: 2005-07-18 Shaun Jackman * libgloss/arm/libcfunc.c (abort): Call _exit instead of the RDI swi. (alarm): Add the weak attribute. (pause): New function. Return ENOSYS. * libgloss/arm/syscalls.c (_getpid): Add the weak attribute. (_fstat): Ditto. (_stat): Ditto. (_link): Ditto. Return ENOSYS. (_unlink): Call the swi instead of returning -1. (_raise): Add the weak attribute. Return ENOSYS. (isatty): Rename to _isatty. Call the swi instead of returning 1. (_system): Call the swi instead of returning ENOSYS. (_rename): Ditto. --- libgloss/arm/libcfunc.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'libgloss/arm/libcfunc.c') diff --git a/libgloss/arm/libcfunc.c b/libgloss/arm/libcfunc.c index ddc611f34..f684c2526 100644 --- a/libgloss/arm/libcfunc.c +++ b/libgloss/arm/libcfunc.c @@ -5,10 +5,12 @@ Note: These functions are in a seperate file so that OS providers can overrride the system call stubs (defined in syscalls.c) without having to provide libc funcitons as well. */ + #include "swi.h" +#include +#include #ifdef ARM_RDI_MONITOR - static inline int do_AngelSWI (int reason, void * arg) { @@ -22,19 +24,28 @@ do_AngelSWI (int reason, void * arg) } #endif /* ARM_RDI_MONITOR */ - void abort (void) { + extern void _exit (int n); #ifdef ARM_RDI_MONITOR do_AngelSWI (AngelSWI_Reason_ReportException, (void *) ADP_Stopped_RunTimeError); #else - asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit)); + _exit(17); #endif } -void -alarm (void) +unsigned __attribute__((weak)) +alarm (unsigned seconds) +{ + (void)seconds; + return 0; +} + +int __attribute__((weak)) +pause (void) { + errno = ENOSYS; + return -1; } -- cgit v1.2.3