Commit Graph

17 Commits

Author SHA1 Message Date
Corinna Vinschen 95c929196b * syscalls.c (_isatty): Fix return value. 2010-08-27 11:55:36 +00:00
Jeff Johnston 847e89f8e1 2007-08-10 Carlos O'Donell <carlos@codesourcery.com>
2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>

        * arm/syscalls.c (_stat): Use _close

        * arm/syscalls.c (struct poslog): Rename to...
        (struct fdent): ... this.
        (FILE_HANDLE_OFFSET): Remove.
        (findslot): Return a struct fdent* if fd is valid, otherwise return NULL.
        (newslot): New function.
        (remap_handle): Remove.
        (initialise_monitor_handles): Use stdout as fallback for stderr.
        (wrap): Rename to...
        (checkerror): ...  this.
        (_swiread): Use checkerror() for the return of SWI calls.  Correct the use of r0.
        (_read): Use findslot().  Return EBADF on bad handle.
        (_swilseek): Call findslot().  Check for valid whence.  Check for negative offset when using
        SEEK_CUR, and check for overflow.  Use checkerror().  Check *_Flen calls for errors.
        (_swiwrite): Correct the use of r0.
        (_write): Call findslot().
        (_swiopen): Call findslot().  Check for valid flags.  Use checkerror().  Call newslot().
        Handle O_TRUNC, and O_WRONLY.  Return index into openfiles[] for fd.
        (_swiclose): Correct the use of r0.
        (_close): Handle stderr == stdout case.  Only reclaim handle if _swiclose succeeded.
        (_getpid): Use __attribute__((unused)).
        (_sbrk): Fix formatting.
        (_swistat): New function.
        (_stat): Call _swistat().
        (_fstat): Call _swistat().
        (_unlink): Correct the use of r0.
        (isatty): Call finslot().  Correct the use of r0.
        (_system): Call checkerror().  Correct the use of r0.
        (_rename): Correct the use of r0.
2007-08-10 19:36:46 +00:00
Jeff Johnston de229adb1a 2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
* arm/syscalls.c (gettimeofday): Change to POSIX signature
        where second argument is passed as void *.
        * bfin/syscalls.c (gettimeofday): Ditto.
        * cris/gensyscalls (gettimeofday): Ditto.
        * cris/linunistd.h (gettimeofday): Ditto.
        * crx/time.c (gettimeofday): Ditto.
        * frv/sim-time.c (gettimeofday): Ditto.
        * i386/cygmon-salib.c (gettimeofday): Ditto.
        * libnosys/gettod.c (gettimeofday): Ditto.
        * m68k/io-gettimeofday.c (gettimeofday): Ditto.
        * sparc/cygmon-salib.c (gettimeofday): Ditto.
        * spu/gettimeofday.c (gettimeofday): Ditto.
2007-07-06 17:00:13 +00:00
Jeff Johnston 4d95d0e99a 2006-01-03 Kazu Hirata <kazu@codesourcery.com>
* arm/Makefile (RDPMON_OBJS): Add _exit.o and _kill.o.
        (RDIMON_OBJS): Define in terms of RDPMON_OBJS.
        (rdimon-_exit.o, rdimon-_kill.o): New.
        * arm/_exit.c, arm/_kill.c: New.
        * arm/syscalls.c (_exit, _kill): Remove.
2007-01-03 16:55:25 +00:00
Kazu Hirata 3e0c6ff3a7 * arm/licfunc.c (do_AngelSWI): Remove.
* arm/syscalls.c (do_AngelSWI): Remove.
	* arm/swi.h (do_AngelSWI): New.
2006-12-25 23:05:24 +00:00
Kazu Hirata 7f0213da6b * arm/syscalls.c (_unlink, _system, _rename): Cast arguments
to do_AngelSWI to int.
2006-12-25 23:03:21 +00:00
Jeff Johnston 73c20c325d 2006-06-13 Sandra Loosemore <sandra@codesourcery.com>
* arm/syscalls.c (_unlink, isatty, _system, _rename):
        Make them do something useful in the ARM_RDI_MONITOR case.
2006-06-13 20:51:08 +00:00
Jeff Johnston 4c602151f2 2006-06-05 Shaun Jackman <sjackman@gmail.com>
* arm/syscalls.c (kill) [ARM_RDI_MONITOR]: Use the signal
        argument to choose an ADP exception reason.
        * arm/libcfunc.c (abort): Remove this function.
2006-06-05 19:46:18 +00:00
Jeff Johnston f9fa511d46 2006-02-07 Paul Brook <paul@codesourcery.com>
* arm/crt0.S: Add Thumb-2 startup code.
        * arm/redboot-crt0.S: Ditto.
        * arm/libcfunc.c (do_AngelSWI): Use AngelSWIInsn.
        * arm/swi.h (AngelSWIInsn, AngelSWIAsm): Define.
        * arm/trap.S: Disable for Thumb-2.
2006-02-07 18:46:23 +00:00
Jeff Johnston 7c15164f17 2005-11-30 Shaun Jackman <sjackman@gmail.com>
* arm/libcfunc.c (clock, sleep, usleep): New functions.
        * arm/syscalls.c (_clock): New function.
        (_times): Call _clock.
2005-11-30 23:37:14 +00:00
Jeff Johnston e448b01f6b 2005-08-16 Shaun Jackman <sjackman@gmail.com>
* arm/syscalls.c (initialise_monitor_handles): Set
        monitor_stderr to the result of SWI_open(":tt", "a")
        instead of simply duplicating stdout.
2005-08-16 18:05:35 +00:00
Jeff Johnston 0e77a3817f 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-08-02 19:17:21 +00:00
Jeff Johnston ce4654708c 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.
2005-07-18 16:18:17 +00:00
Jeff Johnston 9cc53904f6 2005-05-05 Tobias Anderberg <tobias.anderberg@axis.com>
* arm/syscalls.c (get_errno): Fix output register constraint.
2005-05-05 23:15:53 +00:00
Jeff Johnston e525f6d51a 2005-04-28 Shaun Jackman <sjackman@gmail.com>
* libgloss/syscalls.c (get_errno): Add an output register constraint.
2005-04-28 18:40:39 +00:00
Jeff Johnston 1d7dd82d69 2005-02-08 Antony King <antony.king@st.com>
* arm/syscalls.c: Change CHECK_INIT to pass reentrant struct
        instead of file pointer.
2005-02-08 19:38:47 +00:00
Jeff Johnston a7364adeb9 2004-06-09 Toralf Lund <toralf@procaptura.com>
* arm/crt0.S: Copied from newlib and it now also sets up stacks for
        FIQ and IRQ mode, plus calls hardware_init_hook() and
        software_init_hook() if present.
        * arm/libcfunc.c, arm/swi.h, arm/syscalls.c: Copied
        from newlib.
        * arm/Makefile.in: Build crt0.o, rdpmon-crt0.o, rdimon-crt0.o,
        librdpmon.a, librdimon.a - support file for "bare" setup, as well
        as "RDP" and "RDI" monitors.
        * arm/coff-rdpmon.specs, arm/elf-rdpmon.specs,
        arm/coff-rdimon.specs, arm/elf-rdimon.specs: gcc specs files to go
        with above mentioned support libs and startfiles.
2004-06-09 19:06:50 +00:00