diff options
author | Raymond Danks <raymond@edanks.com> | 2006-04-18 01:36:07 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-04-18 01:36:07 +0000 |
commit | 3cb13e039b0c1686c987315760c812d153e6b399 (patch) | |
tree | c49ed4f5c9b6bac53828b1c7a27eaf7674c6e4e6 /packages/libaio/files | |
parent | f58b825f8d1319d278df8527bce57bb09958ac19 (diff) |
libaio: initial add. Patched for MIPS.
Diffstat (limited to 'packages/libaio/files')
-rw-r--r-- | packages/libaio/files/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/libaio/files/libaio-0.3.103-more-arches.patch | 173 | ||||
-rw-r--r-- | packages/libaio/files/raw.h | 39 |
3 files changed, 212 insertions, 0 deletions
diff --git a/packages/libaio/files/.mtn2git_empty b/packages/libaio/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/libaio/files/.mtn2git_empty diff --git a/packages/libaio/files/libaio-0.3.103-more-arches.patch b/packages/libaio/files/libaio-0.3.103-more-arches.patch new file mode 100644 index 0000000000..e09b392ff3 --- /dev/null +++ b/packages/libaio/files/libaio-0.3.103-more-arches.patch @@ -0,0 +1,173 @@ +diff -urN libaio-0.3.103/src/io_cancel.c libaio-0.3.103.new/src/io_cancel.c +--- libaio-0.3.103/src/io_cancel.c 2003-05-20 09:54:50.000000000 -0600 ++++ libaio-0.3.103.new/src/io_cancel.c 2005-10-13 17:32:27.000000000 -0600 +@@ -17,6 +17,7 @@ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #include <libaio.h> ++#include <errno.h> + #include "syscall.h" + + io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, struct iocb *, iocb, struct io_event *, event) +diff -urN libaio-0.3.103/src/libaio.h libaio-0.3.103.new/src/libaio.h +--- libaio-0.3.103/src/libaio.h 2004-09-14 13:40:27.000000000 -0600 ++++ libaio-0.3.103.new/src/libaio.h 2005-10-13 17:32:27.000000000 -0600 +@@ -48,7 +48,7 @@ + IO_CMD_NOOP = 6, + } io_iocb_cmd_t; + +-#if defined(__i386__) /* little endian, 32 bits */ ++#if defined(__i386__) || defined(__mips__) /* little endian, 32 bits */ + #define PADDED(x, y) x; unsigned y + #define PADDEDptr(x, y) x; unsigned y + #define PADDEDul(x, y) unsigned long x; unsigned y +diff -urN libaio-0.3.103/src/syscall-mips.h libaio-0.3.103.new/src/syscall-mips.h +--- libaio-0.3.103/src/syscall-mips.h 1969-12-31 17:00:00.000000000 -0700 ++++ libaio-0.3.103.new/src/syscall-mips.h 2005-10-13 17:41:50.000000000 -0600 +@@ -0,0 +1,134 @@ ++#define __NR_io_setup 4000+241 ++#define __NR_io_destroy 4000+242 ++#define __NR_io_getevents 4000+243 ++#define __NR_io_submit 4000+244 ++#define __NR_io_cancel 4000+245 ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %3\t\t\t# " #sname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ errno = __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a, btype b) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %4\t\t\t# " #sname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ errno = __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a, btype b, ctype c) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #sname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ errno = __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ ++type fname(atype a, btype b, ctype c, dtype d) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #sname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ errno = __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname (atype a,btype b,ctype c,dtype d,etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ register unsigned long __a4 asm("$8") = (unsigned long) e; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %6\t\t\t# " #sname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \ ++ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ errno = __v0; \ ++ return (type) -1; \ ++} ++ +diff -urN libaio-0.3.103/src/syscall.h libaio-0.3.103.new/src/syscall.h +--- libaio-0.3.103/src/syscall.h 2005-01-21 07:11:20.000000000 -0700 ++++ libaio-0.3.103.new/src/syscall.h 2005-10-13 17:33:06.000000000 -0600 +@@ -20,6 +20,8 @@ + #include "syscall-ppc.h" + #elif defined(__s390__) + #include "syscall-s390.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #error "add syscall-arch.h" + #endif diff --git a/packages/libaio/files/raw.h b/packages/libaio/files/raw.h new file mode 100644 index 0000000000..642f78ce5a --- /dev/null +++ b/packages/libaio/files/raw.h @@ -0,0 +1,39 @@ +/* Copyright (C) 1999 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_RAW_H +#define _SYS_RAW_H 1 + +#include <stdint.h> +#include <sys/ioctl.h> + +/* The major device number for raw devices. */ +#define RAW_MAJOR 162 + +/* `ioctl' commands for raw devices. */ +#define RAW_SETBIND _IO(0xac, 0) +#define RAW_GETBIND _IO(0xac, 1) + +struct raw_config_request +{ + int raw_minor; + uint64_t block_major; + uint64_t block_minor; +}; + +#endif /* sys/raw.h */ |