patch-2.4.21 linux-2.4.21/include/asm-s390x/unistd.h
Next file: linux-2.4.21/include/asm-sh/hdreg.h
Previous file: linux-2.4.21/include/asm-s390x/types.h
Back to the patch index
Back to the overall index
- Lines: 134
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-s390x/unistd.h
- Orig date:
2002-08-02 17:39:45.000000000 -0700
diff -urN linux-2.4.20/include/asm-s390x/unistd.h linux-2.4.21/include/asm-s390x/unistd.h
@@ -180,6 +180,7 @@
#define __NR_pivot_root 217
#define __NR_mincore 218
#define __NR_madvise 219
+#define __NR_readahead 222
/*
* Numbers 224-235 are reserved for posix acl
*/
@@ -198,31 +199,33 @@
return (type) (res); \
} while (0)
-#define _svc_clobber "2", "cc", "memory"
+#define _svc_clobber "cc", "memory"
#define _syscall0(type,name) \
type name(void) { \
+ register long __svcres asm("2"); \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lgr %0,2" \
- : "=d" (__res) \
+ : "=d" (__svcres) \
: "i" (__NR_##name) \
: _svc_clobber ); \
+ __res = __svcres; \
__syscall_return(type,__res); \
}
#define _syscall1(type,name,type1,arg1) \
type name(type1 arg1) { \
register type1 __arg1 asm("2") = arg1; \
+ register long __svcres asm("2"); \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lgr %0,2" \
- : "=d" (__res) \
+ : "=d" (__svcres) \
: "i" (__NR_##name), \
- "d" (__arg1) \
+ "0" (__arg1) \
: _svc_clobber ); \
+ __res = __svcres; \
__syscall_return(type,__res); \
}
@@ -230,15 +233,16 @@
type name(type1 arg1, type2 arg2) { \
register type1 __arg1 asm("2") = arg1; \
register type2 __arg2 asm("3") = arg2; \
+ register long __svcres asm("2"); \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lgr %0,2" \
- : "=d" (__res) \
+ : "=d" (__svcres) \
: "i" (__NR_##name), \
- "d" (__arg1), \
+ "0" (__arg1), \
"d" (__arg2) \
: _svc_clobber ); \
+ __res = __svcres; \
__syscall_return(type,__res); \
}
@@ -247,16 +251,17 @@
register type1 __arg1 asm("2") = arg1; \
register type2 __arg2 asm("3") = arg2; \
register type3 __arg3 asm("4") = arg3; \
+ register long __svcres asm("2"); \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lgr %0,2" \
- : "=d" (__res) \
+ : "=d" (__svcres) \
: "i" (__NR_##name), \
- "d" (__arg1), \
+ "0" (__arg1), \
"d" (__arg2), \
"d" (__arg3) \
: _svc_clobber ); \
+ __res = __svcres; \
__syscall_return(type,__res); \
}
@@ -267,17 +272,18 @@
register type2 __arg2 asm("3") = arg2; \
register type3 __arg3 asm("4") = arg3; \
register type4 __arg4 asm("5") = arg4; \
+ register long __svcres asm("2"); \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lgr %0,2" \
- : "=d" (__res) \
+ : "=d" (__svcres) \
: "i" (__NR_##name), \
- "d" (__arg1), \
+ "0" (__arg1), \
"d" (__arg2), \
"d" (__arg3), \
"d" (__arg4) \
: _svc_clobber ); \
+ __res = __svcres; \
__syscall_return(type,__res); \
}
@@ -290,18 +296,19 @@
register type3 __arg3 asm("4") = arg3; \
register type4 __arg4 asm("5") = arg4; \
register type5 __arg5 asm("6") = arg5; \
+ register long __svcres asm("2"); \
long __res; \
__asm__ __volatile__ ( \
" svc %b1\n" \
- " lgr %0,2" \
- : "=d" (__res) \
+ : "=d" (__svcres) \
: "i" (__NR_##name), \
- "d" (__arg1), \
+ "0" (__arg1), \
"d" (__arg2), \
"d" (__arg3), \
"d" (__arg4), \
"d" (__arg5) \
: _svc_clobber ); \
+ __res = __svcres; \
__syscall_return(type,__res); \
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)