diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-08-02 19:17:21 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-08-02 19:17:21 +0000 |
commit | 0e77a3817f45f0bcadc0665200b143abc1c7c4c0 (patch) | |
tree | d5fa8c1e08240ae4d82807dd633c50dceb25991d /libgloss | |
parent | 723d64e6673c7871b7c26cdac005a862162cfa3e (diff) | |
download | newlib-0e77a3817f45f0bcadc0665200b143abc1c7c4c0.zip newlib-0e77a3817f45f0bcadc0665200b143abc1c7c4c0.tar.gz newlib-0e77a3817f45f0bcadc0665200b143abc1c7c4c0.tar.bz2 |
2005-08-02 Shaun Jackman <sjackman@gmail.com>
* libgloss/arm/syscalls.c (_exit): Call _kill with the second
argument set to -1, which is an invalid signal number.
(_kill): Comment and coding style changes only.
(_raise): Remove function.
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/ChangeLog | 7 | ||||
-rw-r--r-- | libgloss/arm/syscalls.c | 39 |
2 files changed, 21 insertions, 25 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index 28e273d..f06bc7c 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,10 @@ +2005-08-02 Shaun Jackman <sjackman@gmail.com> + + * libgloss/arm/syscalls.c (_exit): Call _kill with the second + argument set to -1, which is an invalid signal number. + (_kill): Comment and coding style changes only. + (_raise): Remove function. + 2005-07-19 Paul Brook <paul@codesourcery.com> * arm/crt0.S: Ensure doubleword stack alignment. diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c index f178049..a4f24c6 100644 --- a/libgloss/arm/syscalls.c +++ b/libgloss/arm/syscalls.c @@ -22,7 +22,6 @@ int _rename _PARAMS ((const char *, const char *)); int _isatty _PARAMS ((int)); clock_t _times _PARAMS ((struct tms *)); int _gettimeofday _PARAMS ((struct timeval *, struct timezone *)); -int _raise _PARAMS ((int)); int _unlink _PARAMS ((const char *)); int _link _PARAMS ((void)); int _stat _PARAMS ((const char *, struct stat *)); @@ -434,30 +433,28 @@ _close (int file) return wrap (_swiclose (file)); } -void -_exit (int n) -{ - /* FIXME: return code is thrown away. */ - -#ifdef ARM_RDI_MONITOR - 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) +_kill (int pid, int sig) { + (void)pid; (void)sig; #ifdef ARM_RDI_MONITOR + /* Note: Both arguments are thrown away. */ 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 __attribute__((weak)) @@ -545,14 +542,6 @@ _unlink (const char *path) #endif } -int __attribute__((weak)) -_raise (int sig) -{ - (void)sig; - errno = ENOSYS; - return -1; -} - int _gettimeofday (struct timeval * tp, struct timezone * tzp) { |