diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-21 10:37:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-21 10:37:27 -0500 |
commit | 77835492ed489c0b870f82f4c50687bd267acc0a (patch) | |
tree | d80903ce1b8dd30aa44ccfc756616ad4d6c74d63 /include/linux/syscalls.h | |
parent | af37501c792107c2bde1524bdae38d9a247b841a (diff) | |
parent | 1de9e8e70f5acc441550ca75433563d91b269bbe (diff) |
Merge commit 'v2.6.29-rc2' into perfcounters/core
Conflicts:
include/linux/syscalls.h
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 169 |
1 files changed, 117 insertions, 52 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a1d177ce0a08..fc81937009f5 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -54,6 +54,7 @@ struct compat_stat; | |||
54 | struct compat_timeval; | 54 | struct compat_timeval; |
55 | struct robust_list_head; | 55 | struct robust_list_head; |
56 | struct getcpu_cache; | 56 | struct getcpu_cache; |
57 | struct old_linux_dirent; | ||
57 | struct perf_counter_hw_event; | 58 | struct perf_counter_hw_event; |
58 | 59 | ||
59 | #include <linux/types.h> | 60 | #include <linux/types.h> |
@@ -66,6 +67,74 @@ struct perf_counter_hw_event; | |||
66 | #include <linux/quota.h> | 67 | #include <linux/quota.h> |
67 | #include <linux/key.h> | 68 | #include <linux/key.h> |
68 | 69 | ||
70 | #define __SC_DECL1(t1, a1) t1 a1 | ||
71 | #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) | ||
72 | #define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__) | ||
73 | #define __SC_DECL4(t4, a4, ...) t4 a4, __SC_DECL3(__VA_ARGS__) | ||
74 | #define __SC_DECL5(t5, a5, ...) t5 a5, __SC_DECL4(__VA_ARGS__) | ||
75 | #define __SC_DECL6(t6, a6, ...) t6 a6, __SC_DECL5(__VA_ARGS__) | ||
76 | |||
77 | #define __SC_LONG1(t1, a1) long a1 | ||
78 | #define __SC_LONG2(t2, a2, ...) long a2, __SC_LONG1(__VA_ARGS__) | ||
79 | #define __SC_LONG3(t3, a3, ...) long a3, __SC_LONG2(__VA_ARGS__) | ||
80 | #define __SC_LONG4(t4, a4, ...) long a4, __SC_LONG3(__VA_ARGS__) | ||
81 | #define __SC_LONG5(t5, a5, ...) long a5, __SC_LONG4(__VA_ARGS__) | ||
82 | #define __SC_LONG6(t6, a6, ...) long a6, __SC_LONG5(__VA_ARGS__) | ||
83 | |||
84 | #define __SC_CAST1(t1, a1) (t1) a1 | ||
85 | #define __SC_CAST2(t2, a2, ...) (t2) a2, __SC_CAST1(__VA_ARGS__) | ||
86 | #define __SC_CAST3(t3, a3, ...) (t3) a3, __SC_CAST2(__VA_ARGS__) | ||
87 | #define __SC_CAST4(t4, a4, ...) (t4) a4, __SC_CAST3(__VA_ARGS__) | ||
88 | #define __SC_CAST5(t5, a5, ...) (t5) a5, __SC_CAST4(__VA_ARGS__) | ||
89 | #define __SC_CAST6(t6, a6, ...) (t6) a6, __SC_CAST5(__VA_ARGS__) | ||
90 | |||
91 | #define __SC_TEST(type) BUILD_BUG_ON(sizeof(type) > sizeof(long)) | ||
92 | #define __SC_TEST1(t1, a1) __SC_TEST(t1) | ||
93 | #define __SC_TEST2(t2, a2, ...) __SC_TEST(t2); __SC_TEST1(__VA_ARGS__) | ||
94 | #define __SC_TEST3(t3, a3, ...) __SC_TEST(t3); __SC_TEST2(__VA_ARGS__) | ||
95 | #define __SC_TEST4(t4, a4, ...) __SC_TEST(t4); __SC_TEST3(__VA_ARGS__) | ||
96 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | ||
97 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | ||
98 | |||
99 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | ||
100 | #define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) | ||
101 | #define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) | ||
102 | #define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) | ||
103 | #define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) | ||
104 | #define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) | ||
105 | #define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) | ||
106 | |||
107 | #ifdef CONFIG_PPC64 | ||
108 | #define SYSCALL_ALIAS(alias, name) \ | ||
109 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | ||
110 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | ||
111 | #else | ||
112 | #define SYSCALL_ALIAS(alias, name) \ | ||
113 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) | ||
114 | #endif | ||
115 | |||
116 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
117 | |||
118 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | ||
119 | #define SYSCALL_DEFINEx(x, name, ...) \ | ||
120 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ | ||
121 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ | ||
122 | asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ | ||
123 | { \ | ||
124 | __SC_TEST##x(__VA_ARGS__); \ | ||
125 | return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ | ||
126 | } \ | ||
127 | SYSCALL_ALIAS(sys_##name, SyS_##name); \ | ||
128 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) | ||
129 | |||
130 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
131 | |||
132 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | ||
133 | #define SYSCALL_DEFINEx(x, name, ...) \ | ||
134 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) | ||
135 | |||
136 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
137 | |||
69 | asmlinkage long sys_time(time_t __user *tloc); | 138 | asmlinkage long sys_time(time_t __user *tloc); |
70 | asmlinkage long sys_stime(time_t __user *tptr); | 139 | asmlinkage long sys_stime(time_t __user *tptr); |
71 | asmlinkage long sys_gettimeofday(struct timeval __user *tv, | 140 | asmlinkage long sys_gettimeofday(struct timeval __user *tv, |
@@ -78,7 +147,7 @@ asmlinkage long sys_times(struct tms __user *tbuf); | |||
78 | 147 | ||
79 | asmlinkage long sys_gettid(void); | 148 | asmlinkage long sys_gettid(void); |
80 | asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp); | 149 | asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp); |
81 | asmlinkage unsigned long sys_alarm(unsigned int seconds); | 150 | asmlinkage long sys_alarm(unsigned int seconds); |
82 | asmlinkage long sys_getpid(void); | 151 | asmlinkage long sys_getpid(void); |
83 | asmlinkage long sys_getppid(void); | 152 | asmlinkage long sys_getppid(void); |
84 | asmlinkage long sys_getuid(void); | 153 | asmlinkage long sys_getuid(void); |
@@ -167,7 +236,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, | |||
167 | unsigned long flags); | 236 | unsigned long flags); |
168 | 237 | ||
169 | asmlinkage long sys_exit(int error_code); | 238 | asmlinkage long sys_exit(int error_code); |
170 | asmlinkage void sys_exit_group(int error_code); | 239 | asmlinkage long sys_exit_group(int error_code); |
171 | asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, | 240 | asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, |
172 | int options, struct rusage __user *ru); | 241 | int options, struct rusage __user *ru); |
173 | asmlinkage long sys_waitid(int which, pid_t pid, | 242 | asmlinkage long sys_waitid(int which, pid_t pid, |
@@ -197,7 +266,7 @@ asmlinkage long sys_tkill(int pid, int sig); | |||
197 | asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo); | 266 | asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo); |
198 | asmlinkage long sys_sgetmask(void); | 267 | asmlinkage long sys_sgetmask(void); |
199 | asmlinkage long sys_ssetmask(int newmask); | 268 | asmlinkage long sys_ssetmask(int newmask); |
200 | asmlinkage unsigned long sys_signal(int sig, __sighandler_t handler); | 269 | asmlinkage long sys_signal(int sig, __sighandler_t handler); |
201 | asmlinkage long sys_pause(void); | 270 | asmlinkage long sys_pause(void); |
202 | 271 | ||
203 | asmlinkage long sys_sync(void); | 272 | asmlinkage long sys_sync(void); |
@@ -247,29 +316,29 @@ asmlinkage long sys_lsetxattr(const char __user *path, const char __user *name, | |||
247 | const void __user *value, size_t size, int flags); | 316 | const void __user *value, size_t size, int flags); |
248 | asmlinkage long sys_fsetxattr(int fd, const char __user *name, | 317 | asmlinkage long sys_fsetxattr(int fd, const char __user *name, |
249 | const void __user *value, size_t size, int flags); | 318 | const void __user *value, size_t size, int flags); |
250 | asmlinkage ssize_t sys_getxattr(const char __user *path, const char __user *name, | 319 | asmlinkage long sys_getxattr(const char __user *path, const char __user *name, |
251 | void __user *value, size_t size); | 320 | void __user *value, size_t size); |
252 | asmlinkage ssize_t sys_lgetxattr(const char __user *path, const char __user *name, | 321 | asmlinkage long sys_lgetxattr(const char __user *path, const char __user *name, |
253 | void __user *value, size_t size); | 322 | void __user *value, size_t size); |
254 | asmlinkage ssize_t sys_fgetxattr(int fd, const char __user *name, | 323 | asmlinkage long sys_fgetxattr(int fd, const char __user *name, |
255 | void __user *value, size_t size); | 324 | void __user *value, size_t size); |
256 | asmlinkage ssize_t sys_listxattr(const char __user *path, char __user *list, | 325 | asmlinkage long sys_listxattr(const char __user *path, char __user *list, |
257 | size_t size); | 326 | size_t size); |
258 | asmlinkage ssize_t sys_llistxattr(const char __user *path, char __user *list, | 327 | asmlinkage long sys_llistxattr(const char __user *path, char __user *list, |
259 | size_t size); | 328 | size_t size); |
260 | asmlinkage ssize_t sys_flistxattr(int fd, char __user *list, size_t size); | 329 | asmlinkage long sys_flistxattr(int fd, char __user *list, size_t size); |
261 | asmlinkage long sys_removexattr(const char __user *path, | 330 | asmlinkage long sys_removexattr(const char __user *path, |
262 | const char __user *name); | 331 | const char __user *name); |
263 | asmlinkage long sys_lremovexattr(const char __user *path, | 332 | asmlinkage long sys_lremovexattr(const char __user *path, |
264 | const char __user *name); | 333 | const char __user *name); |
265 | asmlinkage long sys_fremovexattr(int fd, const char __user *name); | 334 | asmlinkage long sys_fremovexattr(int fd, const char __user *name); |
266 | 335 | ||
267 | asmlinkage unsigned long sys_brk(unsigned long brk); | 336 | asmlinkage long sys_brk(unsigned long brk); |
268 | asmlinkage long sys_mprotect(unsigned long start, size_t len, | 337 | asmlinkage long sys_mprotect(unsigned long start, size_t len, |
269 | unsigned long prot); | 338 | unsigned long prot); |
270 | asmlinkage unsigned long sys_mremap(unsigned long addr, | 339 | asmlinkage long sys_mremap(unsigned long addr, |
271 | unsigned long old_len, unsigned long new_len, | 340 | unsigned long old_len, unsigned long new_len, |
272 | unsigned long flags, unsigned long new_addr); | 341 | unsigned long flags, unsigned long new_addr); |
273 | asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, | 342 | asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, |
274 | unsigned long prot, unsigned long pgoff, | 343 | unsigned long prot, unsigned long pgoff, |
275 | unsigned long flags); | 344 | unsigned long flags); |
@@ -322,10 +391,10 @@ asmlinkage long sys_io_submit(aio_context_t, long, | |||
322 | struct iocb __user * __user *); | 391 | struct iocb __user * __user *); |
323 | asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, | 392 | asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, |
324 | struct io_event __user *result); | 393 | struct io_event __user *result); |
325 | asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, | 394 | asmlinkage long sys_sendfile(int out_fd, int in_fd, |
326 | off_t __user *offset, size_t count); | 395 | off_t __user *offset, size_t count); |
327 | asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, | 396 | asmlinkage long sys_sendfile64(int out_fd, int in_fd, |
328 | loff_t __user *offset, size_t count); | 397 | loff_t __user *offset, size_t count); |
329 | asmlinkage long sys_readlink(const char __user *path, | 398 | asmlinkage long sys_readlink(const char __user *path, |
330 | char __user *buf, int bufsiz); | 399 | char __user *buf, int bufsiz); |
331 | asmlinkage long sys_creat(const char __user *pathname, int mode); | 400 | asmlinkage long sys_creat(const char __user *pathname, int mode); |
@@ -369,26 +438,25 @@ asmlinkage long sys_utime(char __user *filename, | |||
369 | struct utimbuf __user *times); | 438 | struct utimbuf __user *times); |
370 | asmlinkage long sys_utimes(char __user *filename, | 439 | asmlinkage long sys_utimes(char __user *filename, |
371 | struct timeval __user *utimes); | 440 | struct timeval __user *utimes); |
372 | asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, | 441 | asmlinkage long sys_lseek(unsigned int fd, off_t offset, |
373 | unsigned int origin); | 442 | unsigned int origin); |
374 | asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, | 443 | asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, |
375 | unsigned long offset_low, loff_t __user *result, | 444 | unsigned long offset_low, loff_t __user *result, |
376 | unsigned int origin); | 445 | unsigned int origin); |
377 | asmlinkage ssize_t sys_read(unsigned int fd, char __user *buf, | 446 | asmlinkage long sys_read(unsigned int fd, char __user *buf, size_t count); |
378 | size_t count); | 447 | asmlinkage long sys_readahead(int fd, loff_t offset, size_t count); |
379 | asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count); | 448 | asmlinkage long sys_readv(unsigned long fd, |
380 | asmlinkage ssize_t sys_readv(unsigned long fd, | 449 | const struct iovec __user *vec, |
381 | const struct iovec __user *vec, | 450 | unsigned long vlen); |
382 | unsigned long vlen); | 451 | asmlinkage long sys_write(unsigned int fd, const char __user *buf, |
383 | asmlinkage ssize_t sys_write(unsigned int fd, const char __user *buf, | 452 | size_t count); |
384 | size_t count); | 453 | asmlinkage long sys_writev(unsigned long fd, |
385 | asmlinkage ssize_t sys_writev(unsigned long fd, | 454 | const struct iovec __user *vec, |
386 | const struct iovec __user *vec, | 455 | unsigned long vlen); |
387 | unsigned long vlen); | 456 | asmlinkage long sys_pread64(unsigned int fd, char __user *buf, |
388 | asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, | 457 | size_t count, loff_t pos); |
389 | size_t count, loff_t pos); | 458 | asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf, |
390 | asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, | 459 | size_t count, loff_t pos); |
391 | size_t count, loff_t pos); | ||
392 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); | 460 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); |
393 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); | 461 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); |
394 | asmlinkage long sys_chdir(const char __user *filename); | 462 | asmlinkage long sys_chdir(const char __user *filename); |
@@ -477,7 +545,7 @@ asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | |||
477 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 545 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
478 | asmlinkage long sys_mq_unlink(const char __user *name); | 546 | asmlinkage long sys_mq_unlink(const char __user *name); |
479 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); | 547 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); |
480 | asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); | 548 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); |
481 | asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); | 549 | asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); |
482 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); | 550 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); |
483 | 551 | ||
@@ -531,11 +599,6 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages, | |||
531 | const int __user *nodes, | 599 | const int __user *nodes, |
532 | int __user *status, | 600 | int __user *status, |
533 | int flags); | 601 | int flags); |
534 | asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page, | ||
535 | __u32 __user *pages, | ||
536 | const int __user *nodes, | ||
537 | int __user *status, | ||
538 | int flags); | ||
539 | asmlinkage long sys_mbind(unsigned long start, unsigned long len, | 602 | asmlinkage long sys_mbind(unsigned long start, unsigned long len, |
540 | unsigned long mode, | 603 | unsigned long mode, |
541 | unsigned long __user *nmask, | 604 | unsigned long __user *nmask, |
@@ -584,13 +647,6 @@ asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *bu | |||
584 | int bufsiz); | 647 | int bufsiz); |
585 | asmlinkage long sys_utimensat(int dfd, char __user *filename, | 648 | asmlinkage long sys_utimensat(int dfd, char __user *filename, |
586 | struct timespec __user *utimes, int flags); | 649 | struct timespec __user *utimes, int flags); |
587 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | ||
588 | struct compat_timeval __user *t); | ||
589 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | ||
590 | struct compat_stat __user *statbuf, | ||
591 | int flag); | ||
592 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | ||
593 | int flags, int mode); | ||
594 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 650 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
595 | 651 | ||
596 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, | 652 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, |
@@ -622,6 +678,15 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); | |||
622 | asmlinkage long sys_eventfd(unsigned int count); | 678 | asmlinkage long sys_eventfd(unsigned int count); |
623 | asmlinkage long sys_eventfd2(unsigned int count, int flags); | 679 | asmlinkage long sys_eventfd2(unsigned int count, int flags); |
624 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); | 680 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); |
681 | asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); | ||
682 | asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, | ||
683 | fd_set __user *, struct timespec __user *, | ||
684 | void __user *); | ||
685 | asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, | ||
686 | struct timespec __user *, const sigset_t __user *, | ||
687 | size_t); | ||
688 | asmlinkage long sys_pipe2(int __user *, int); | ||
689 | asmlinkage long sys_pipe(int __user *); | ||
625 | 690 | ||
626 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | 691 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); |
627 | 692 | ||