diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-07-18 16:18:17 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-07-18 16:18:17 +0000 |
commit | ce4654708cc111c6eff691d1e564e3fb5b64eb17 (patch) | |
tree | bb1d96ad859f90f418cd6100d72fea2a7bae7f6f /libgloss/arm/libcfunc.c | |
parent | e17dbb54c7511db941829c353eb1a95bd3d43ace (diff) | |
download | cygnal-ce4654708cc111c6eff691d1e564e3fb5b64eb17.tar.gz cygnal-ce4654708cc111c6eff691d1e564e3fb5b64eb17.tar.bz2 cygnal-ce4654708cc111c6eff691d1e564e3fb5b64eb17.zip |
2005-07-18 Shaun Jackman <sjackman@gmail.com>
* 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.
Diffstat (limited to 'libgloss/arm/libcfunc.c')
-rw-r--r-- | libgloss/arm/libcfunc.c | 21 |
1 files changed, 16 insertions, 5 deletions
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 <errno.h> +#include <unistd.h> #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; } |