diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-02-18 02:24:59 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-02-18 02:24:59 +0000 |
commit | 33f3f8954d202664c7c7a224d13ba5a0c14a0e01 (patch) | |
tree | e0f840c6480989b155a172c09109241a7be183e7 /ports/sysdeps/unix/sysv/linux/mips | |
parent | fa83b30737d538378a98cab7fbc982ae3f8ac442 (diff) | |
download | eglibc2-33f3f8954d202664c7c7a224d13ba5a0c14a0e01.tar.gz |
Merge changes between r17050 and r17194 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@17195 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/mips')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/bits/eventfd.h | 31 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/bits/inotify.h | 29 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/bits/signalfd.h | 29 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/entry.h | 5 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 10 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h | 54 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/sys/inotify.h | 107 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/sys/signalfd.h | 66 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/mips/sys/tas.h | 70 |
9 files changed, 98 insertions, 303 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/eventfd.h b/ports/sysdeps/unix/sysv/linux/mips/bits/eventfd.h new file mode 100644 index 000000000..6ac2cd83d --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _SYS_EVENTFD_H +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." +#endif + +/* Flags for eventfd. */ +enum + { + EFD_SEMAPHORE = 00000001, +#define EFD_SEMAPHORE EFD_SEMAPHORE + EFD_CLOEXEC = 02000000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 00000200 +#define EFD_NONBLOCK EFD_NONBLOCK + }; diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/inotify.h b/ports/sysdeps/unix/sysv/linux/mips/bits/inotify.h new file mode 100644 index 000000000..67d648bd9 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _SYS_INOTIFY_H +# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." +#endif + +/* Flags for the parameter of inotify_init1. */ +enum + { + IN_CLOEXEC = 02000000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 00000200 +#define IN_NONBLOCK IN_NONBLOCK + }; diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/signalfd.h b/ports/sysdeps/unix/sysv/linux/mips/bits/signalfd.h new file mode 100644 index 000000000..c2bea7605 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SIGNALFD_H +# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." +#endif + +/* Flags for signalfd. */ +enum + { + SFD_CLOEXEC = 02000000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 00000200 +#define SFD_NONBLOCK SFD_NONBLOCK + }; diff --git a/ports/sysdeps/unix/sysv/linux/mips/entry.h b/ports/sysdeps/unix/sysv/linux/mips/entry.h deleted file mode 100644 index 04d05d2b0..000000000 --- a/ports/sysdeps/unix/sysv/linux/mips/entry.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __ASSEMBLY__ -extern void __start (void); -#endif - -#define ENTRY_POINT __start diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 061e32244..57de0a434 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -37,7 +37,15 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -#ifndef __ASSEMBLER__ +#ifdef __ASSEMBLER__ + +/* We don't want the label for the error handler to be visible in the symbol + table when we define it here. */ +#ifdef __PIC__ +# define SYSCALL_ERROR_LABEL 99b +#endif + +#else /* ! __ASSEMBLER__ */ /* Define a macro which expands into the inline wrapper code for a system call. */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h deleted file mode 100644 index b30d09a83..000000000 --- a/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_EVENTFD_H -#define _SYS_EVENTFD_H 1 - -#include <stdint.h> - - -/* Type for event counter. */ -typedef uint64_t eventfd_t; - -/* Flags for signalfd. */ -enum - { - EFD_SEMAPHORE = 1, -#define EFD_SEMAPHORE EFD_SEMAPHORE - EFD_CLOEXEC = 02000000, -#define EFD_CLOEXEC EFD_CLOEXEC - EFD_NONBLOCK = 0200 -#define EFD_NONBLOCK EFD_NONBLOCK - }; - - -__BEGIN_DECLS - -/* Return file descriptor for generic event channel. Set initial - value to COUNT. */ -extern int eventfd (int __count, int __flags) __THROW; - -/* Read event counter and possibly wait for events. */ -extern int eventfd_read (int __fd, eventfd_t *__value); - -/* Increment event counter. */ -extern int eventfd_write (int __fd, eventfd_t __value); - -__END_DECLS - -#endif /* sys/eventfd.h */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/ports/sysdeps/unix/sysv/linux/mips/sys/inotify.h deleted file mode 100644 index d1d050921..000000000 --- a/ports/sysdeps/unix/sysv/linux/mips/sys/inotify.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_INOTIFY_H -#define _SYS_INOTIFY_H 1 - -#include <stdint.h> - - -/* Flags for the parameter of inotify_init1. */ -enum - { - IN_CLOEXEC = 02000000, -#define IN_CLOEXEC IN_CLOEXEC - IN_NONBLOCK = 0200 -#define IN_NONBLOCK IN_NONBLOCK - }; - - -/* Structure describing an inotify event. */ -struct inotify_event -{ - int wd; /* Watch descriptor. */ - uint32_t mask; /* Watch mask. */ - uint32_t cookie; /* Cookie to synchronize two events. */ - uint32_t len; /* Length (including NULs) of name. */ - char name __flexarr; /* Name. */ -}; - - -/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ -#define IN_ACCESS 0x00000001 /* File was accessed. */ -#define IN_MODIFY 0x00000002 /* File was modified. */ -#define IN_ATTRIB 0x00000004 /* Metadata changed. */ -#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ -#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_OPEN 0x00000020 /* File was opened. */ -#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ -#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ -#define IN_CREATE 0x00000100 /* Subfile was created. */ -#define IN_DELETE 0x00000200 /* Subfile was deleted. */ -#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ -#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ - -/* Events sent by the kernel. */ -#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ -#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ -#define IN_IGNORED 0x00008000 /* File was ignored. */ - -/* Helper events. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ - -/* Special flags. */ -#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a - directory. */ -#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ -#define IN_EXCL_UNLINK 0x04000000 /* Exclude events on unlinked - objects. */ -#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already - existing watch. */ -#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ -#define IN_ONESHOT 0x80000000 /* Only send event once. */ - -/* All events which a program can wait on. */ -#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ - | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ - | IN_MOVED_TO | IN_CREATE | IN_DELETE \ - | IN_DELETE_SELF | IN_MOVE_SELF) - - -__BEGIN_DECLS - -/* Create and initialize inotify instance. */ -extern int inotify_init (void) __THROW; - -/* Create and initialize inotify instance. */ -extern int inotify_init1 (int __flags) __THROW; - -/* Add watch of object NAME to inotify instance FD. Notify about - events specified by MASK. */ -extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) - __THROW; - -/* Remove the watch specified by WD from the inotify instance FD. */ -extern int inotify_rm_watch (int __fd, int __wd) __THROW; - -__END_DECLS - -#endif /* sys/inotify.h */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/signalfd.h b/ports/sysdeps/unix/sysv/linux/mips/sys/signalfd.h deleted file mode 100644 index 08923c086..000000000 --- a/ports/sysdeps/unix/sysv/linux/mips/sys/signalfd.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2007, 2008 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SIGNALFD_H -#define _SYS_SIGNALFD_H 1 - -#define __need_sigset_t -#include <signal.h> -#include <stdint.h> - - -struct signalfd_siginfo -{ - uint32_t ssi_signo; - int32_t ssi_errno; - int32_t ssi_code; - uint32_t ssi_pid; - uint32_t ssi_uid; - int32_t ssi_fd; - uint32_t ssi_tid; - uint32_t ssi_band; - uint32_t ssi_overrun; - uint32_t ssi_trapno; - int32_t ssi_status; - int32_t ssi_int; - uint64_t ssi_ptr; - uint64_t ssi_utime; - uint64_t ssi_stime; - uint64_t ssi_addr; - uint8_t __pad[48]; -}; - -/* Flags for signalfd. */ -enum - { - SFD_CLOEXEC = 02000000, -#define SFD_CLOEXEC SFD_CLOEXEC - SFD_NONBLOCK = 0200 -#define SFD_NONBLOCK SFD_NONBLOCK - }; - -__BEGIN_DECLS - -/* Request notification for delivery of signals in MASK to be - performed using descriptor FD.*/ -extern int signalfd (int __fd, const sigset_t *__mask, int __flags) - __THROW __nonnull ((2)); - -__END_DECLS - -#endif /* sys/signalfd.h */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/tas.h b/ports/sysdeps/unix/sysv/linux/mips/sys/tas.h deleted file mode 100644 index c5c80550e..000000000 --- a/ports/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 2000, 2002, 2003, 2004, 2007, 2009 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_TAS_H -#define _SYS_TAS_H 1 - -#include <features.h> -#include <sgidefs.h> - -__BEGIN_DECLS - -extern int _test_and_set (int *__p, int __v) __THROW; - -#ifdef __USE_EXTERN_INLINES - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE __extern_inline -# endif - -_EXTERN_INLINE int -__NTH (_test_and_set (int *__p, int __v)) -{ - int __r, __t; - - __asm__ __volatile__ - ("/* Inline test and set */\n" - ".set push\n\t" -#if _MIPS_SIM == _ABIO32 - ".set mips2\n\t" -#endif - "sync\n\t" - "1:\n\t" - "ll %0,%3\n\t" - "move %1,%4\n\t" - "beq %0,%4,2f\n\t" - "sc %1,%2\n\t" - "beqz %1,1b\n" - "sync\n\t" - ".set pop\n\t" - "2:\n\t" - "/* End test and set */" - : "=&r" (__r), "=&r" (__t), "=m" (*__p) - : "m" (*__p), "r" (__v) - : "memory"); - - return __r; -} - -#endif /* __USE_EXTERN_INLINES */ - -__END_DECLS - -#endif /* sys/tas.h */ |