Avoid endian.h include in MIPS string functions.
[glibc.git] / sysdeps / unix / mips / wait.S
blobcabd2409c152e5a330c38ebbe6c33e57cb07e71e
1 /* Copyright (C) 1992, 1994, 1995, 1997, 2002, 2003
2    Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4    Contributed by Brendan Kehoe (brendan@zen.org).
6    The GNU C Library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
11    The GNU C Library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
16    You should have received a copy of the GNU Lesser General Public
17    License along with the GNU C Library.  If not, see
18    <http://www.gnu.org/licenses/>.  */
20 #include <sysdep.h>
22 .set noreorder
24 ENTRY(__wait)
25         /* Prep it for wait.  */
26         move a1, zero
27         move a2, zero
29         li v0, SYS_wait
30         syscall
31         beqz a3, L(noerror)
32         nop
33         j __syscall_error
34         nop
36 L(noerror):
37         /* If the arg is not NULL, store v1 there.  */
38         beqz a0, L(noarg)
39         nop
40         sw v1, 0(a0)
41         nop
42 L(noarg):
43         ret
44         .end __wait
46 weak_alias (__wait, wait)