summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorSteven J. Magnani <steve@digidescorp.com>2010-11-10 19:32:13 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-10 19:44:36 +0100
commitbc71df2efbf1a007365b7c3841da781bdfdafce2 (patch)
tree885115d6abbc4eab3ffb9aa74715c583beeae598 /libc/sysdeps/linux
parent20dc758d24f3e6fc19c3d8a3a029a32072cd6a29 (diff)
microblaze: kernel headers
Sync kernel header definitions with those used in recent mainline kernels. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/microblaze/bits/fcntl.h17
-rw-r--r--libc/sysdeps/linux/microblaze/bits/kernel_stat.h74
-rw-r--r--libc/sysdeps/linux/microblaze/bits/kernel_types.h29
-rw-r--r--libc/sysdeps/linux/microblaze/bits/poll.h8
-rw-r--r--libc/sysdeps/linux/microblaze/sys/ptrace.h8
5 files changed, 72 insertions, 64 deletions
diff --git a/libc/sysdeps/linux/microblaze/bits/fcntl.h b/libc/sysdeps/linux/microblaze/bits/fcntl.h
index bb6727ad8..44e8f3f5b 100644
--- a/libc/sysdeps/linux/microblaze/bits/fcntl.h
+++ b/libc/sysdeps/linux/microblaze/bits/fcntl.h
@@ -23,6 +23,9 @@
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -42,11 +45,11 @@
#define O_ASYNC 020000
#ifdef __USE_GNU
-# define O_DIRECTORY 040000 /* Must be a directory. */
-# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_DIRECT 0200000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_DIRECTORY 0200000 /* Must be a directory. */
+# define O_NOFOLLOW 0400000 /* Do not follow links. */
+# define O_DIRECT 040000 /* Direct disk access. */
+# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* set close_on_exec */
#endif
/* For now Linux has synchronisity options for data and read operations.
@@ -58,7 +61,7 @@
#endif
#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0400000
+# define O_LARGEFILE 0100000
#endif
/* Values for the second argument to `fcntl'. */
@@ -96,6 +99,8 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
close-on-exit set on new fd. */
+# define F_SETPIPE_SZ 1031 /* Set of pipe page size array */
+# define F_GETPIPE_SZ 1032 /* Get of pipe page size array */
#endif
/* For F_[GET|SET]FL. */
diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_stat.h b/libc/sysdeps/linux/microblaze/bits/kernel_stat.h
index de35488bd..2c5eb28af 100644
--- a/libc/sysdeps/linux/microblaze/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/microblaze/bits/kernel_stat.h
@@ -9,50 +9,44 @@
struct kernel_stat
{
- __kernel_dev_t st_dev;
- __kernel_ino_t st_ino;
- __kernel_mode_t st_mode;
- __kernel_nlink_t st_nlink;
- __kernel_uid_t st_uid;
- __kernel_gid_t st_gid;
- __kernel_dev_t st_rdev;
- __kernel_off_t st_size;
- unsigned long st_blksize;
- unsigned long st_blocks;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- unsigned long __unused4;
- unsigned long __unused5;
+ unsigned long st_dev; /* Device. */
+ unsigned long st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned int st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group. */
+ unsigned long st_rdev; /* Device number, if device. */
+ unsigned long __pad1;
+ long st_size; /* Size of file, in bytes. */
+ int st_blksize; /* Optimal block size for I/O. */
+ int __pad2;
+ long st_blocks; /* Number 512-byte blocks allocated. */
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+ unsigned int __unused4;
+ unsigned int __unused5;
};
struct kernel_stat64
{
- __kernel_dev_t st_dev;
- unsigned long __unused0;
- unsigned long __unused1;
-
- __kernel_ino64_t st_ino;
-
- __kernel_mode_t st_mode;
- __kernel_nlink_t st_nlink;
-
- __kernel_uid_t st_uid;
- __kernel_gid_t st_gid;
-
- __kernel_dev_t st_rdev;
- unsigned long __unused2;
- unsigned long __unused3;
-
- __kernel_loff_t st_size;
- unsigned long st_blksize;
-
- unsigned long __unused4; /* future possible st_blocks high bits */
- unsigned long st_blocks; /* Number 512-byte blocks allocated. */
-
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
+ unsigned long long st_dev; /* Device. */
+ unsigned long long st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned int st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group. */
+ unsigned long long st_rdev; /* Device number, if device. */
+ unsigned long long __pad1;
+ long long st_size; /* Size of file, in bytes. */
+ int st_blksize; /* Optimal block size for I/O. */
+ int __pad2;
+ long long st_blocks; /* Number 512-byte blocks allocated. */
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+ unsigned int __unused4;
+ unsigned int __unused5;
};
#endif /* _BITS_STAT_STRUCT_H */
diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
index 1ca2dae30..2a7057502 100644
--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h
+++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
@@ -13,18 +13,17 @@
* Microblaze port by John Williams
*/
-#ifndef __MICROBLAZE_POSIX_TYPES_H__
-#define __MICROBLAZE_POSIX_TYPES_H__
+#ifndef _ASM_MICROBLAZE_POSIX_TYPES_H
+#define _ASM_MICROBLAZE_POSIX_TYPES_H
-typedef unsigned int __kernel_dev_t;
+typedef unsigned long __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
-typedef unsigned long long __kernel_ino64_t;
-typedef unsigned int __kernel_mode_t;
-typedef unsigned int __kernel_nlink_t;
+//typedef unsigned long long __kernel_ino64_t;
+typedef unsigned short __kernel_mode_t;
+typedef unsigned long __kernel_nlink_t;
typedef long __kernel_off_t;
-typedef long long __kernel_loff_t;
typedef int __kernel_pid_t;
-typedef unsigned short __kernel_ipc_pid_t;
+typedef int __kernel_ipc_pid_t;
typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
typedef unsigned int __kernel_size_t;
@@ -33,6 +32,8 @@ typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
+typedef int __kernel_timer_t;
+typedef int __kernel_clockid_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
@@ -40,9 +41,13 @@ typedef unsigned short __kernel_gid16_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
-typedef unsigned short __kernel_old_uid_t;
-typedef unsigned short __kernel_old_gid_t;
-typedef __kernel_dev_t __kernel_old_dev_t;
+typedef unsigned int __kernel_old_uid_t;
+typedef unsigned int __kernel_old_gid_t;
+typedef unsigned int __kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long __kernel_loff_t;
+#endif
typedef struct {
#ifdef __USE_ALL
@@ -52,4 +57,4 @@ typedef struct {
#endif
} __kernel_fsid_t;
-#endif /* __MICROBLAZE_POSIX_TYPES_H__ */
+#endif /* _ASM_MICROBLAZE_POSIX_TYPES_H */
diff --git a/libc/sysdeps/linux/microblaze/bits/poll.h b/libc/sysdeps/linux/microblaze/bits/poll.h
index f7a739315..78ee877c0 100644
--- a/libc/sysdeps/linux/microblaze/bits/poll.h
+++ b/libc/sysdeps/linux/microblaze/bits/poll.h
@@ -29,10 +29,10 @@
#ifdef __USE_XOPEN
/* These values are defined in XPG4.2. */
-# define POLLRDNORM 0x040 /* Normal data may be read. */
-# define POLLRDBAND 0x080 /* Priority data may be read. */
-# define POLLWRNORM POLLOUT /* Writing now will not block. */
-# define POLLWRBAND 0x100 /* Priority data may be written. */
+# define POLLRDNORM 0x0040 /* Normal data may be read. */
+# define POLLRDBAND 0x0080 /* Priority data may be read. */
+# define POLLWRNORM 0x0100 /* Writing now will not block. */
+# define POLLWRBAND 0x0200 /* Priority data may be written. */
#endif
/* Event types always implicitly polled for. These bits need not be set in
diff --git a/libc/sysdeps/linux/microblaze/sys/ptrace.h b/libc/sysdeps/linux/microblaze/sys/ptrace.h
index b7a9adf25..26d153ce1 100644
--- a/libc/sysdeps/linux/microblaze/sys/ptrace.h
+++ b/libc/sysdeps/linux/microblaze/sys/ptrace.h
@@ -65,12 +65,16 @@ enum __ptrace_request
PTRACE_KILL = 8,
#define PT_KILL PTRACE_KILL
+ /* Single step the process. */
+ PTRACE_SINGLESTEP = 9,
+#define PT_STEP PTRACE_SINGLESTEP
+
/* Attach to a process that is already running. */
- PTRACE_ATTACH = 0x10,
+ PTRACE_ATTACH = 16,
#define PT_ATTACH PTRACE_ATTACH
/* Detach from a process attached to with PTRACE_ATTACH. */
- PTRACE_DETACH = 0x11,
+ PTRACE_DETACH = 17,
#define PT_DETACH PTRACE_DETACH
/* Continue and stop at the next (return from) syscall. */