|
@@ -0,0 +1,124 @@
|
|
1
|
+Index: libaio-0.3.109/src/libaio.h
|
|
2
|
+===================================================================
|
|
3
|
+--- libaio-0.3.109.orig/src/libaio.h 2014-06-11 10:41:12.537824814 +0200
|
|
4
|
++++ libaio-0.3.109/src/libaio.h 2014-06-11 10:41:12.537824814 +0200
|
|
5
|
+@@ -134,6 +134,10 @@
|
|
6
|
+ #define PADDEDptr(x, y) x
|
|
7
|
+ #define PADDEDul(x, y) unsigned long x
|
|
8
|
+ # endif
|
|
9
|
++#elif defined(__avr32__) /* big endian, 32 bits */
|
|
10
|
++#define PADDED(x, y) unsigned y; x
|
|
11
|
++#define PADDEDptr(x, y) unsigned y; x
|
|
12
|
++#define PADDEDul(x, y) unsigned y; unsigned long x;
|
|
13
|
+ #else
|
|
14
|
+ #error endian?
|
|
15
|
+ #endif
|
|
16
|
+Index: libaio-0.3.109/src/syscall-avr32.h
|
|
17
|
+===================================================================
|
|
18
|
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
19
|
++++ libaio-0.3.109/src/syscall-avr32.h 2014-06-11 10:41:12.537824814 +0200
|
|
20
|
+@@ -0,0 +1,91 @@
|
|
21
|
++/*
|
|
22
|
++ * Copyright (C) 2007 Atmel Corporation
|
|
23
|
++ *
|
|
24
|
++ * This program is free software; you can redistribute it and/or modify
|
|
25
|
++ * it under the terms of the GNU General Public License version 2 as
|
|
26
|
++ * published by the Free Software Foundation.
|
|
27
|
++ */
|
|
28
|
++
|
|
29
|
++#define __NR_io_setup 197
|
|
30
|
++#define __NR_io_destroy 198
|
|
31
|
++#define __NR_io_getevents 199
|
|
32
|
++#define __NR_io_submit 200
|
|
33
|
++#define __NR_io_cancel 201
|
|
34
|
++
|
|
35
|
++#define io_syscall1(type,fname,sname,type1,arg1) \
|
|
36
|
++type fname(type1 arg1) \
|
|
37
|
++{ \
|
|
38
|
++ register long __r12 __asm__("r12") = (long)arg1; \
|
|
39
|
++ register long __res_r12 __asm__("r12"); \
|
|
40
|
++ register long __scno __asm__("r8") = __NR_##sname; \
|
|
41
|
++ __asm__ __volatile__("scall" \
|
|
42
|
++ : "=r"(__res_r12) \
|
|
43
|
++ : "0"(__r12), "r"(__scno) \
|
|
44
|
++ : "memory"); \
|
|
45
|
++ return (type) __res_r12; \
|
|
46
|
++}
|
|
47
|
++
|
|
48
|
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
|
|
49
|
++type fname(type1 arg1, type2 arg2) \
|
|
50
|
++{ \
|
|
51
|
++ register long __r12 __asm__("r12") = (long)arg1; \
|
|
52
|
++ register long __r11 __asm__("r11") = (long)arg2; \
|
|
53
|
++ register long __res_r12 __asm__("r12"); \
|
|
54
|
++ register long __scno __asm__("r8") = __NR_##sname; \
|
|
55
|
++ __asm__ __volatile__("scall" \
|
|
56
|
++ : "=r"(__res_r12) \
|
|
57
|
++ : "0"(__r12), "r"(__r11), "r"(__scno) \
|
|
58
|
++ : "memory"); \
|
|
59
|
++ return (type) __res_r12; \
|
|
60
|
++}
|
|
61
|
++
|
|
62
|
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
|
|
63
|
++type fname(type1 arg1, type2 arg2, type3 arg3) \
|
|
64
|
++{ \
|
|
65
|
++ register long __r12 __asm__("r12") = (long)arg1; \
|
|
66
|
++ register long __r11 __asm__("r11") = (long)arg2; \
|
|
67
|
++ register long __r10 __asm__("r10") = (long)arg3; \
|
|
68
|
++ register long __res_r12 __asm__("r12"); \
|
|
69
|
++ register long __scno __asm__("r8") = __NR_##sname; \
|
|
70
|
++ __asm__ __volatile__("scall" \
|
|
71
|
++ : "=r"(__res_r12) \
|
|
72
|
++ : "0"(__r12), "r"(__r11), "r"(__r10), \
|
|
73
|
++ "r"(__scno) \
|
|
74
|
++ : "memory"); \
|
|
75
|
++ return (type) __res_r12; \
|
|
76
|
++}
|
|
77
|
++
|
|
78
|
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
|
|
79
|
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
|
|
80
|
++{ \
|
|
81
|
++ register long __r12 __asm__("r12") = (long)arg1; \
|
|
82
|
++ register long __r11 __asm__("r11") = (long)arg2; \
|
|
83
|
++ register long __r10 __asm__("r10") = (long)arg3; \
|
|
84
|
++ register long __r9 __asm__("r9") = (long)arg4; \
|
|
85
|
++ register long __res_r12 __asm__("r12"); \
|
|
86
|
++ register long __scno __asm__("r8") = __NR_##sname; \
|
|
87
|
++ __asm__ __volatile__("scall" \
|
|
88
|
++ : "=r"(__res_r12) \
|
|
89
|
++ : "0"(__r12), "r"(__r11), "r"(__r10), \
|
|
90
|
++ "r"(__r9), "r"(__scno) \
|
|
91
|
++ : "memory"); \
|
|
92
|
++ return (type) __res_r12; \
|
|
93
|
++}
|
|
94
|
++
|
|
95
|
++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
|
|
96
|
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
|
|
97
|
++{ \
|
|
98
|
++ register long __r12 __asm__("r12") = (long)arg1; \
|
|
99
|
++ register long __r11 __asm__("r11") = (long)arg2; \
|
|
100
|
++ register long __r10 __asm__("r10") = (long)arg3; \
|
|
101
|
++ register long __r9 __asm__("r9") = (long)arg4; \
|
|
102
|
++ register long __r5 __asm__("r5") = (long)arg5; \
|
|
103
|
++ register long __res_r12 __asm__("r12"); \
|
|
104
|
++ register long __scno __asm__("r8") = __NR_##sname; \
|
|
105
|
++ __asm__ __volatile__("scall" \
|
|
106
|
++ : "=r"(__res_r12) \
|
|
107
|
++ : "0"(__r12), "r"(__r11), "r"(__r10), \
|
|
108
|
++ "r"(__r9), "r"(__r5), "r"(__scno) \
|
|
109
|
++ : "memory"); \
|
|
110
|
++ return (type) __res_r12; \
|
|
111
|
++}
|
|
112
|
+Index: libaio-0.3.109/src/syscall.h
|
|
113
|
+===================================================================
|
|
114
|
+--- libaio-0.3.109.orig/src/syscall.h 2014-06-11 10:41:12.537824814 +0200
|
|
115
|
++++ libaio-0.3.109/src/syscall.h 2014-06-11 10:41:12.537824814 +0200
|
|
116
|
+@@ -38,6 +38,8 @@
|
|
117
|
+ #include "syscall-sh.h"
|
|
118
|
+ #elif defined(__aarch64__)
|
|
119
|
+ #include "syscall-arm64.h"
|
|
120
|
++#elif defined(__avr32__)
|
|
121
|
++#include "syscall-avr32.h"
|
|
122
|
+ #else
|
|
123
|
+ #error "add syscall-arch.h"
|
|
124
|
+ #endif
|