summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/bits
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/mips/bits')
-rw-r--r--libc/sysdeps/linux/mips/bits/fcntl.h35
-rw-r--r--libc/sysdeps/linux/mips/bits/poll.h6
-rw-r--r--libc/sysdeps/linux/mips/bits/resource.h57
3 files changed, 69 insertions, 29 deletions
diff --git a/libc/sysdeps/linux/mips/bits/fcntl.h b/libc/sysdeps/linux/mips/bits/fcntl.h
index 1a2d40cd7..87affe3f3 100644
--- a/libc/sysdeps/linux/mips/bits/fcntl.h
+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006
+ 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
@@ -21,9 +22,9 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
+#include <sgidefs.h>
#include <sys/types.h>
-
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0x0003
@@ -48,7 +49,7 @@
# define O_NOFOLLOW 0x20000 /* Do not follow links. */
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_DIRECTORY 0x10000 /* Must be a directory. */
-# define O_STREAMING 0x4000000/* streaming access */
+# define O_NOATIME 0x40000 /* Do not set atime. */
#endif
#define O_NDELAY O_NONBLOCK
@@ -81,7 +82,7 @@
#define F_SETLK64 34 /* Set record locking info (non-blocking). */
#define F_SETLKW64 35 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */
#endif
@@ -143,14 +144,20 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
- long int l_sysid; /* XXX */
+#if _MIPS_SIM != _ABI64
+ /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
+ fcntls in o32 and n32, never has this field. */
+ long int l_sysid;
+#endif
#else
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
__pid_t l_pid; /* Process holding the lock. */
-#ifndef __USE_FILE_OFFSET64
- long int pad[4]; /* XXX */
+#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64
+ /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
+ flock in o32 and n32, never has this field. */
+ long int pad[4];
#endif
} flock_t;
@@ -185,3 +192,17 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+/* Linux-specific operations for posix_fadvise. */
+#ifdef __USE_GNU
+# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
+# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
diff --git a/libc/sysdeps/linux/mips/bits/poll.h b/libc/sysdeps/linux/mips/bits/poll.h
index f62b9c394..eee4ea253 100644
--- a/libc/sysdeps/linux/mips/bits/poll.h
+++ b/libc/sysdeps/linux/mips/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006 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
@@ -36,8 +36,10 @@
#endif
#ifdef __USE_GNU
-/* This is an extension for Linux. */
+/* These are extensions for Linux. */
# define POLLMSG 0x400
+# define POLLREMOVE 0x1000
+# define POLLRDHUP 0x2000
#endif
/* Event types always implicitly polled for. These bits need not be set in
diff --git a/libc/sysdeps/linux/mips/bits/resource.h b/libc/sysdeps/linux/mips/bits/resource.h
index b8551a239..9e99f5d5d 100644
--- a/libc/sysdeps/linux/mips/bits/resource.h
+++ b/libc/sysdeps/linux/mips/bits/resource.h
@@ -1,5 +1,6 @@
/* Bit values & structures for resource limits. Linux/MIPS version.
- Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006
+ 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
@@ -55,34 +56,54 @@ enum __rlimit_resource
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
- RLIMIT_RSS = 7,
-#define RLIMIT_RSS RLIMIT_RSS
+ __RLIMIT_RSS = 7,
+#define RLIMIT_RSS __RLIMIT_RSS
/* Number of open files. */
RLIMIT_NOFILE = 5,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+ __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
/* Address space limit (?) */
RLIMIT_AS = 6,
#define RLIMIT_AS RLIMIT_AS
/* Number of processes. */
- RLIMIT_NPROC = 8,
-#define RLIMIT_NPROC RLIMIT_NPROC
+ __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
/* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 9,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+ __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
/* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
-
- RLIM_NLIMITS = 11
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+ __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
+
+ /* Maximum number of pending signals. */
+ __RLIMIT_SIGPENDING = 11,
+#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
+
+ /* Maximum bytes in POSIX message queues. */
+ __RLIMIT_MSGQUEUE = 12,
+#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
+
+ /* Maximum nice priority allowed to raise to.
+ Nice levels 19 .. -20 correspond to 0 .. 39
+ values of this resource limit. */
+ __RLIMIT_NICE = 13,
+#define RLIMIT_NICE __RLIMIT_NICE
+
+ /* Maximum realtime priority allowed for non-priviledged
+ processes. */
+ __RLIMIT_RTPRIO = 14,
+#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+
+ __RLIMIT_NLIMITS = 15,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+#define RLIM_NLIMITS __RLIM_NLIMITS
};
/* Value to indicate that there is no limit. */
@@ -137,12 +158,8 @@ enum __rusage_who
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
+ RUSAGE_CHILDREN = -1
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
};
#define __need_timeval