[PATCH 49/56] microblaze_v2: fcntl.h sockios.h ucontext.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: monstr
Date: Sunday, May 4, 2008 - 4:41 am

From: Michal Simek <monstr@monstr.eu>


Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 include/asm-microblaze/fcntl.h    |  104 +++++++++++++++++++++++++++++++++++++
 include/asm-microblaze/sockios.h  |   25 +++++++++
 include/asm-microblaze/ucontext.h |   24 +++++++++
 3 files changed, 153 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-microblaze/fcntl.h
 create mode 100644 include/asm-microblaze/sockios.h
 create mode 100644 include/asm-microblaze/ucontext.h

diff --git a/include/asm-microblaze/fcntl.h b/include/asm-microblaze/fcntl.h
new file mode 100644
index 0000000..b8706c9
--- /dev/null
+++ b/include/asm-microblaze/fcntl.h
@@ -0,0 +1,104 @@
+/*
+ * include/asm-microblaze/fcntl.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2006 Atmark Techno, Inc.
+ */
+
+#ifndef _ASM_MICROBLAZE_FCNTL_H
+#define _ASM_MICROBLAZE_FCNTL_H
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE	0003
+#define O_RDONLY	00
+#define O_WRONLY	01
+#define O_RDWR		02
+#define O_CREAT		0100 /* not fcntl */
+#define O_EXCL		0200 /* not fcntl */
+#define O_NOCTTY	0400 /* not fcntl */
+#define O_TRUNC		01000 /* not fcntl */
+#define O_APPEND	02000
+#define O_NONBLOCK	04000
+#define O_NDELAY	O_NONBLOCK
+#define O_SYNC		010000
+#define FASYNC		020000 /* fcntl, for BSD compatibility */
+#define O_DIRECTORY	040000 /* must be a directory */
+#define O_NOFOLLOW	0100000 /* don't follow links */
+#define O_LARGEFILE	0200000
+#define O_DIRECT	0400000 /* direct disk access hint */
+#define O_NOATIME	01000000
+#define O_CLOEXEC	02000000
+
+#define F_DUPFD		0 /* dup */
+#define F_GETFD		1 /* get close_on_exec */
+#define F_SETFD		2 /* set/clear close_on_exec */
+#define F_GETFL		3 /* get file->f_flags */
+#define F_SETFL		4 /* set file->f_flags */
+#define F_GETLK		5
+#define F_SETLK		6
+#define F_SETLKW	7
+
+#define F_SETOWN	8 /* for sockets. */
+#define F_GETOWN	9 /* for sockets. */
+#define F_SETSIG	10 /* for sockets. */
+#define F_GETSIG	11 /* for sockets. */
+
+#define F_GETLK64	12 /* using 'struct flock64' */
+#define F_SETLK64	13
+#define F_SETLKW64	14
+
+/* for F_[GET|SET]FL */
+#define FD_CLOEXEC	1 /* actually anything with low bit set goes */
+
+/* for posix fcntl() and lockf() */
+#define F_RDLCK		0
+#define F_WRLCK		1
+#define F_UNLCK		2
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK		4 /* or 3 */
+#define F_SHLCK		8 /* or 4 */
+
+/* for leases */
+#define F_INPROGRESS	16
+
+/* operations for bsd flock(), also used by the kernel implementation */
+#define LOCK_SH		1 /* shared lock */
+#define LOCK_EX		2 /* exclusive lock */
+#define LOCK_NB		4 /* or'd with one of the above to prevent blocking */
+#define LOCK_UN		8 /* remove lock */
+
+#define LOCK_MAND	32 /* This is a mandatory flock */
+#define LOCK_READ	64 /* ... Which allows concurrent read operations */
+#define LOCK_WRITE	128 /* ... Which allows concurrent write operations */
+#define LOCK_RW		192 /* ... Which allows concurrent read & write ops */
+
+#ifdef __KERNEL__
+#define F_POSIX		1
+#define F_FLOCK		2
+#define F_BROKEN	4 /* broken flock() emulation */
+#endif /* __KERNEL__ */
+
+struct flock {
+	short l_type;
+	short l_whence;
+	off_t l_start;
+	off_t l_len;
+	pid_t l_pid;
+};
+
+struct flock64 {
+	short l_type;
+	short l_whence;
+	loff_t l_start;
+	loff_t l_len;
+	pid_t l_pid;
+};
+
+#define F_LINUX_SPECIFIC_BASE	1024
+
+#endif /* _ASM_MICROBLAZE_FCNTL_H */
diff --git a/include/asm-microblaze/sockios.h b/include/asm-microblaze/sockios.h
new file mode 100644
index 0000000..a11b12f
--- /dev/null
+++ b/include/asm-microblaze/sockios.h
@@ -0,0 +1,25 @@
+/*
+ * include/asm-microblaze/sockios.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2006 Atmark Techno, Inc.
+ */
+
+#ifndef _ASM_MICROBLAZE_SOCKIOS_H
+#define _ASM_MICROBLAZE_SOCKIOS_H
+
+#include <asm/ioctl.h>
+
+/* Socket-level I/O control calls. */
+#define FIOSETOWN	0x8901
+#define SIOCSPGRP	0x8902
+#define FIOGETOWN	0x8903
+#define SIOCGPGRP	0x8904
+#define SIOCATMARK	0x8905
+#define SIOCGSTAMP	0x8906		/* Get stamp (timeval) */
+#define SIOCGSTAMPNS	0x8907		/* Get stamp (timespec) */
+
+#endif /* _ASM_MICROBLAZE_SOCKIOS_H */
diff --git a/include/asm-microblaze/ucontext.h b/include/asm-microblaze/ucontext.h
new file mode 100644
index 0000000..7ece650
--- /dev/null
+++ b/include/asm-microblaze/ucontext.h
@@ -0,0 +1,24 @@
+/*
+ * include/asm-microblaze/ucontext.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2006 Atmark Techno, Inc.
+ */
+
+#ifndef _ASM_MICROBLAZE_UCONTEXT_H
+#define _ASM_MICROBLAZE_UCONTEXT_H
+
+#include <asm/sigcontext.h>
+
+struct ucontext {
+	unsigned long		uc_flags;
+	struct ucontext		*uc_link;
+	stack_t			uc_stack;
+	struct sigcontext	uc_mcontext;
+	sigset_t		uc_sigmask; /* mask last for extensibility */
+};
+
+#endif /* _ASM_MICROBLAZE_UCONTEXT_H */
-- 
1.5.4.GIT

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Microblaze patches V2, monstr, (Sun May 4, 4:40 am)
[PATCH 01/56] microblaze_v2: Kconfig patches, monstr, (Sun May 4, 4:40 am)
[PATCH 03/56] microblaze_v2: Cpuinfo handling, monstr, (Sun May 4, 4:40 am)
[PATCH 07/56] microblaze_v2: Signal support, monstr, (Sun May 4, 4:40 am)
[PATCH 09/56] microblaze_v2: cache support, monstr, (Sun May 4, 4:40 am)
[PATCH 12/56] microblaze_v2: lmb support, monstr, (Sun May 4, 4:41 am)
[PATCH 14/56] microblaze_v2: defconfig file, monstr, (Sun May 4, 4:41 am)
[PATCH 17/56] microblaze_v2: checksum support, monstr, (Sun May 4, 4:41 am)
[PATCH 19/56] microblaze_v2: uaccess files, monstr, (Sun May 4, 4:41 am)
[PATCH 20/56] microblaze_v2: heartbeat file, monstr, (Sun May 4, 4:41 am)
[PATCH 22/56] microblaze_v2: asm-offsets, monstr, (Sun May 4, 4:41 am)
[PATCH 24/56] microblaze_v2: time support, monstr, (Sun May 4, 4:41 am)
[PATCH 25/56] microblaze_v2: ptrace support, monstr, (Sun May 4, 4:41 am)
[PATCH 26/56] microblaze_v2: traps support, monstr, (Sun May 4, 4:41 am)
[PATCH 33/56] microblaze_v2: ioctl support, monstr, (Sun May 4, 4:41 am)
[PATCH 36/56] microblaze_v2: dma support, monstr, (Sun May 4, 4:41 am)
[PATCH 37/56] microblaze_v2: headers for irq, monstr, (Sun May 4, 4:41 am)
[PATCH 42/56] microblaze_v2: stats headers, monstr, (Sun May 4, 4:41 am)
[PATCH 48/56] microblaze_v2: pool.h socket.h, monstr, (Sun May 4, 4:41 am)
[PATCH 49/56] microblaze_v2: fcntl.h sockios.h ucontext.h, monstr, (Sun May 4, 4:41 am)
[PATCH 51/56] microblaze_v2: Kbuild file, monstr, (Sun May 4, 4:41 am)
[PATCH 52/56] microblaze_v2: pci headers, monstr, (Sun May 4, 4:41 am)
[PATCH 53/56] microblaze_v2: IPC headers, monstr, (Sun May 4, 4:41 am)
[PATCH 54/56] microblaze_v2: entry.S, monstr, (Sun May 4, 4:41 am)
[PATCH 55/56] microblaze_v2: sys_microblaze.c, monstr, (Sun May 4, 4:41 am)
Re: [PATCH 07/56] microblaze_v2: Signal support, Arnd Bergmann, (Sun May 4, 12:52 pm)
Re: [PATCH 17/56] microblaze_v2: checksum support, Arnd Bergmann, (Sun May 4, 12:59 pm)
Re: [PATCH 30/56] microblaze_v2: includes SHM*, msgbuf, Arnd Bergmann, (Sun May 4, 2:10 pm)
Re: [PATCH 01/56] microblaze_v2: Kconfig patches, Grant Likely, (Sun May 4, 2:24 pm)
Re: [PATCH 32/56] microblaze_v2: definitions of types, Arnd Bergmann, (Sun May 4, 2:28 pm)
Re: [PATCH 33/56] microblaze_v2: ioctl support, Arnd Bergmann, (Sun May 4, 2:34 pm)
Re: [PATCH 42/56] microblaze_v2: stats headers, Arnd Bergmann, (Sun May 4, 3:31 pm)
Re: [PATCH 48/56] microblaze_v2: pool.h socket.h, Arnd Bergmann, (Sun May 4, 3:39 pm)
Re: [PATCH 52/56] microblaze_v2: pci headers, Arnd Bergmann, (Sun May 4, 3:45 pm)
Re: [PATCH 01/56] microblaze_v2: Kconfig patches, John Williams, (Sun May 4, 6:42 pm)
Re: [PATCH 03/56] microblaze_v2: Cpuinfo handling, John Williams, (Sun May 4, 6:52 pm)
Re: [PATCH 09/56] microblaze_v2: cache support, John Williams, (Sun May 4, 7:09 pm)
Re: [PATCH 12/56] microblaze_v2: lmb support, John Williams, (Sun May 4, 7:11 pm)
Re: [PATCH 24/56] microblaze_v2: time support, John Williams, (Sun May 4, 7:19 pm)
Re: [PATCH 36/56] microblaze_v2: dma support, John Williams, (Sun May 4, 7:25 pm)
Re: Microblaze patches V2, John Williams, (Sun May 4, 7:30 pm)
Re: [PATCH 01/56] microblaze_v2: Kconfig patches, Michal Simek, (Sun May 4, 11:36 pm)
Re: [PATCH 36/56] microblaze_v2: dma support, Geert Uytterhoeven, (Sun May 4, 11:45 pm)
Re: [PATCH 01/56] microblaze_v2: Kconfig patches, Michal Simek, (Sun May 4, 11:46 pm)
Re: Microblaze patches V2, Michal Simek, (Mon May 5, 12:02 am)
Re: [PATCH 43/56] microblaze_v2: termbits.h termios.h, Arnd Bergmann, (Mon May 5, 2:50 am)
Re: [PATCH 17/56] microblaze_v2: checksum support, Michal Simek, (Mon May 5, 7:05 am)
Re: [PATCH 33/56] microblaze_v2: ioctl support, Michal Simek, (Mon May 5, 7:06 am)
Re: [PATCH 52/56] microblaze_v2: pci headers, Michal Simek, (Mon May 5, 7:08 am)
Re: [PATCH 01/56] microblaze_v2: Kconfig patches, Michal Simek, (Mon May 5, 7:16 am)
Re: [PATCH 03/56] microblaze_v2: Cpuinfo handling, Michal Simek, (Mon May 5, 7:19 am)
Re: [PATCH 24/56] microblaze_v2: time support, Michal Simek, (Mon May 5, 7:22 am)
Re: [PATCH 04/56] microblaze_v2: Open firmware files, Grant Likely, (Mon May 5, 7:24 am)
Re: [PATCH 18/56] microblaze_v2: early_printk support, Grant Likely, (Mon May 5, 7:36 am)
RE: [PATCH 10/56] microblaze_v2: Generic dts file for plat ..., Stephen Neuendorffer, (Mon May 5, 10:25 am)
RE: [microblaze-uclinux] [PATCH 09/56] microblaze_v2: cach ..., Stephen Neuendorffer, (Mon May 5, 10:37 am)
Re: [PATCH 18/56] microblaze_v2: early_printk support, Michal Simek, (Mon May 5, 1:10 pm)
Re: [PATCH 12/56] microblaze_v2: lmb support, Segher Boessenkool, (Mon May 5, 2:32 pm)
RE: [PATCH 07/56] microblaze_v2: Signal support, Stephen Neuendorffer, (Mon May 5, 2:32 pm)
RE: [PATCH 04/56] microblaze_v2: Open firmware files, Stephen Neuendorffer, (Mon May 5, 2:56 pm)
RE: [PATCH 09/56] microblaze_v2: cache support, Stephen Neuendorffer, (Mon May 5, 3:37 pm)
Re: [PATCH 18/56] microblaze_v2: early_printk support, John Williams, (Mon May 5, 4:22 pm)
RE: [PATCH 10/56] microblaze_v2: Generic dts file for plat ..., Stephen Neuendorffer, (Mon May 5, 4:32 pm)
RE: [PATCH 07/56] microblaze_v2: Signal support, John Williams, (Mon May 5, 4:33 pm)
RE: [PATCH 07/56] microblaze_v2: Signal support, Stephen Neuendorffer, (Mon May 5, 5:13 pm)
RE: [PATCH 10/56] microblaze_v2: Generic dts file for plat ..., Stephen Neuendorffer, (Mon May 5, 5:17 pm)
RE: [PATCH 07/56] microblaze_v2: Signal support, John Williams, (Mon May 5, 5:25 pm)
Re: [PATCH 24/56] microblaze_v2: time support, John Williams, (Mon May 5, 5:30 pm)
RE: [PATCH 07/56] microblaze_v2: Signal support, Stephen Neuendorffer, (Mon May 5, 5:33 pm)
Re: [PATCH 04/56] microblaze_v2: Open firmware files, Michal Simek, (Tue May 6, 12:27 am)
Re: [PATCH 18/56] microblaze_v2: early_printk support, Michal Simek, (Tue May 6, 1:14 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Michal Simek, (Tue May 6, 2:16 am)
Re: [PATCH 07/56] microblaze_v2: Signal support, Michal Simek, (Tue May 6, 2:41 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Geert Uytterhoeven, (Tue May 6, 2:48 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Michal Simek, (Tue May 6, 2:53 am)
Re: [PATCH 24/56] microblaze_v2: time support, Michal Simek, (Tue May 6, 2:56 am)
Re: [PATCH 24/56] microblaze_v2: time support, Michal Simek, (Tue May 6, 3:02 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Geert Uytterhoeven, (Tue May 6, 4:17 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Arnd Bergmann, (Tue May 6, 4:24 am)
Re: [PATCH 24/56] microblaze_v2: time support, Arnd Bergmann, (Tue May 6, 4:38 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Michal Simek, (Tue May 6, 6:20 am)
Re: [PATCH 24/56] microblaze_v2: time support, Michal Simek, (Tue May 6, 6:26 am)
Re: [PATCH 24/56] microblaze_v2: time support, Grant Likely, (Tue May 6, 7:28 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Arnd Bergmann, (Tue May 6, 8:36 am)
RE: [PATCH 24/56] microblaze_v2: time support, Stephen Neuendorffer, (Tue May 6, 9:36 am)
Re: [PATCH 46/56] microblaze_v2: headers files entry.h cur ..., Geert Uytterhoeven, (Tue May 6, 1:57 pm)
Re: [PATCH 24/56] microblaze_v2: time support, John Williams, (Tue May 6, 3:50 pm)
Re: [PATCH 36/56] microblaze_v2: dma support, Michal Simek, (Tue May 6, 11:24 pm)
Re: [PATCH 36/56] microblaze_v2: dma support, Geert Uytterhoeven, (Wed May 7, 12:17 am)
Re: [PATCH 24/56] microblaze_v2: time support, Thomas Gleixner, (Wed May 7, 12:22 am)
Re: [PATCH 37/56] microblaze_v2: headers for irq, Thomas Gleixner, (Wed May 7, 12:26 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Arnd Bergmann, (Wed May 7, 2:21 am)
RE: [microblaze-uclinux] [PATCH 04/56] microblaze_v2: Open ..., Stephen Neuendorffer, (Wed May 7, 9:04 am)
Re: [PATCH 36/56] microblaze_v2: dma support, Michal Simek, (Wed May 7, 11:43 am)
RE: [microblaze-uclinux] [PATCH 04/56] microblaze_v2: Open ..., Stephen Neuendorffer, (Wed May 7, 1:14 pm)
Re: [PATCH 37/56] microblaze_v2: headers for irq, Michal Simek, (Sun May 11, 6:56 am)