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>2006-06-05 23:45:08 +0400
committerJeff Johnston <jjohnstn@redhat.com>2006-06-05 23:45:08 +0400
commit6ea486a6df01b53b8b908fa49ce22f72a8ea47b2 (patch)
tree8170e4f1790e36a3df283b8db6b75691bf8f1f97 /newlib/libc/sys/arm
parent9a9ac027e863a34dbad4b61944c2fc46c16ecb6d (diff)
2006-06-05 Shaun Jackman <sjackman@gmail.com>
configure.host (newlib_cflags) [arm, thumb, xscale]: Remove -DABORT_PROVIDED flag. * newlib/libc/sys/arm/syscalls.c (kill, exit): Sync with libgloss. * newlib/libc/sys/arm/libcfunc.c (abort): Ditto.
Diffstat (limited to 'newlib/libc/sys/arm')
-rw-r--r--newlib/libc/sys/arm/libcfunc.c11
-rw-r--r--newlib/libc/sys/arm/syscalls.c39
2 files changed, 22 insertions, 28 deletions
diff --git a/newlib/libc/sys/arm/libcfunc.c b/newlib/libc/sys/arm/libcfunc.c
index 3bf0a56f4..9fa9cb4b8 100644
--- a/newlib/libc/sys/arm/libcfunc.c
+++ b/newlib/libc/sys/arm/libcfunc.c
@@ -24,17 +24,6 @@ do_AngelSWI (int reason, void * arg)
void
-abort (void)
-{
-#ifdef ARM_RDI_MONITOR
- do_AngelSWI (AngelSWI_Reason_ReportException,
- (void *) ADP_Stopped_RunTimeError);
-#else
- asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
-#endif
-}
-
-void
alarm (void)
{
}
diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c
index 529309930..ad25b95f7 100644
--- a/newlib/libc/sys/arm/syscalls.c
+++ b/newlib/libc/sys/arm/syscalls.c
@@ -12,6 +12,7 @@
#include <sys/times.h>
#include <errno.h>
#include <reent.h>
+#include <signal.h>
#include <unistd.h>
#include "swi.h"
@@ -433,30 +434,34 @@ _close (int file)
return wrap (_swiclose (file));
}
-void
-_exit (int n)
+int
+_kill (int pid, int sig)
{
- /* FIXME: return code is thrown away. */
-
+ (void)pid; (void)sig;
#ifdef ARM_RDI_MONITOR
- do_AngelSWI (AngelSWI_Reason_ReportException,
- (void *) ADP_Stopped_ApplicationExit);
+ /* Note: The pid argument is thrown away. */
+ switch (sig) {
+ case SIGABRT:
+ return do_AngelSWI (AngelSWI_Reason_ReportException,
+ (void *) ADP_Stopped_RunTimeError);
+ default:
+ return do_AngelSWI (AngelSWI_Reason_ReportException,
+ (void *) ADP_Stopped_ApplicationExit);
+ }
#else
asm ("swi %a0" :: "i" (SWI_Exit));
#endif
- n = n;
}
-int
-_kill (int n, int m)
-{
-#ifdef ARM_RDI_MONITOR
- return do_AngelSWI (AngelSWI_Reason_ReportException,
- (void *) ADP_Stopped_ApplicationExit);
-#else
- asm ("swi %a0" :: "i" (SWI_Exit));
-#endif
- n = n; m = m;
+void
+_exit (int status)
+{
+ /* There is only one SWI for both _exit and _kill. For _exit, call
+ the SWI with the second argument set to -1, an invalid value for
+ signum, so that the SWI handler can distinguish the two calls.
+ Note: The RDI implementation of _kill throws away both its
+ arguments. */
+ _kill(status, -1);
}
int