By Sources Reference to Linux i386 Syscalls

Pse. note that this is preliminary, work under progress.

	/* [hp'2000..2011] *//* asmlinkage... syscall sources in linux i386 */

		long compat_sys_adjtimex(struct compat_timex __user *utp)
		long compat_sys_getrusage(int who, struct compat_rusage __user *ru)
		long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, compat_size_t sigsetsize)
		long compat_sys_sigpending(compat_old_sigset_t __user *set)
		long compat_sys_stime(compat_time_t __user *tptr)
		long compat_sys_time(compat_time_t __user * tloc)
		long compat_sys_times(struct compat_tms __user *tbuf)
		long sys_ni_syscall(void)
		long sys_ni_syscall(void);
		long compat_sys_kexec_load(unsigned long entry,
		return sys_kexec_load(entry, nr_segments, ksegments, flags);
		/* Take the kexec_lock here to prevent sys_kexec_load
		long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
		compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
		compat_sys_set_robust_list(struct compat_robust_list_head __user *head,
		* sys_set_robust_list()):
		long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, unsigned int flags)
		long compat_sys_sendmsg(int fd, struct compat_msghdr __user *msg, unsigned flags)
		long compat_sys_socketcall(int call, u32 __user *args)
		*		Alan Cox	:	Added thread locking to sys_* calls
		/* Argument list sizes for sys_socketcall */
		long sys_recv(int fd, void __user *ubuf, size_t size,
		err = sys_bind(a0, (struct sockaddr __user *)a1, a[2]);
		err = sys_connect(a0, (struct sockaddr __user *)a1, a[2]);
		err = sys_listen(a0, a1);
		err = sys_recv(a0, (void __user *)a1, a[2], a[3]);
		err = sys_recvfrom(a0, (void __user *)a1, a[2], a[3],
		err = sys_recvmsg(a0, (struct msghdr __user *)a1, a[2]);
		err = sys_send(a0, (void __user *)a1, a[2], a[3]);
		err = sys_sendmsg(a0, (struct msghdr __user *)a1, a[2]);
		err = sys_sendto(a0, (void __user *)a1, a[2], a[3],
		err = sys_setsockopt(a0, a1, a[2], (char __user *)a[3], a[4]);
		err = sys_shutdown(a0, a1);
		err = sys_socket(a0, a1, a[2]);
		err = sys_socketpair(a0, a1, a[2], (int __user *)a[3]);
		return sys_recvfrom(fd, ubuf, size, flags, NULL, NULL);
		return sys_sendto(fd, buff, len, flags, NULL, 0);
		sys_accept(a0, (struct sockaddr __user *)a1,
		sys_getpeername(a0, (struct sockaddr __user *)a1,
		sys_getsockname(a0, (struct sockaddr __user *)a1,
		sys_getsockopt(a0, a1, a[2], (char __user *)a[3],
		*		Tigran Aivazian	:	sys_send(args) calls sys_sendto(args, NULL, 0)
		long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 __user *buf)
		long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user *buf)
		long compat_sys_futimesat(unsigned int dfd, char __user *filename, struct compat_timeval __user *t)
		long compat_sys_statfs64(const char __user *path, compat_size_t sz, struct compat_statfs64 __user *buf)
		long compat_sys_statfs(const char __user *path, struct compat_statfs __user *buf)
		long compat_sys_utime(char __user *filename, struct compat_utimbuf __user *t)
		long compat_sys_utimensat(unsigned int dfd, char __user *filename, struct compat_timespec __user *t, int flags)
		long compat_sys_utimes(char __user *filename, struct compat_timeval __user *t)
		long compat_sys_nfsservctl(int cmd, void *notused, void *notused2)
		* in the range which were dirty on entry to sys_sync_file_range() are placed
		return sys_sync_file_range(fd, offset, nbytes, flags);
		SYSCALL_ALIAS(sys_sync_file_range2, SyS_sync_file_range2);
		SYSCALL_ALIAS(sys_sync_file_range, SyS_sync_file_range);
		* sys_sync_file_range() are committed to disk.
		* sys_sync_file_range() permits finely controlled syncing over a segment of
		* zero then sys_sync_file_range() will operate from offset out to EOF.
		long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
		{ (cmd), (ioctl_trans_handler_t)sys_ioctl },
		err = sys_ioctl (fd, cmd, (unsigned long)&ifr);
		err = sys_ioctl(fd, cmd, (unsigned long)iobuf);
		err = sys_ioctl(fd, cmd, (unsigned long) &kevent);
		err = sys_ioctl (fd, cmd, (unsigned long)&kifr);
		err = sys_ioctl(fd, cmd, (unsigned long)&kts);
		err = sys_ioctl(fd, cmd, (unsigned long)&ktv);
		err = sys_ioctl(fd, cmd, (unsigned long)&kuid);
		err = sys_ioctl(fd,cmd,(unsigned long)r);
		err = sys_ioctl(fd, cmd, (unsigned long) sgio);
		err = sys_ioctl(fd, cmd, (unsigned long) sioc);
		err = sys_ioctl(fd,cmd,(unsigned long)(&ss));
		err = sys_ioctl(fd, cmd, (unsigned long) up_native);
		err = sys_ioctl(fd, cmd, (unsigned long)&val);
		err = sys_ioctl (fd, kcmd, (unsigned long)karg);
		err = sys_ioctl(fd, PPPIOCGIDLE, (unsigned long) idle);
		err = sys_ioctl(fd, real_cmd, (unsigned long) buf);
		err = sys_ioctl (fd, SIOCGIFCONF, (unsigned long)uifc);
		err = sys_ioctl(fd, SIOCGIFNAME, (unsigned long)uifr);
		err = sys_ioctl(fd, USBDEVFS_DISCSIGNAL, (unsigned long) &kdis);
		ret = sys_ioctl(fd, cmd, arg);
		ret = sys_ioctl(fd, (cmd == RTC_IRQP_READ32) ?
		ret = sys_ioctl(fd, cmd, (unsigned long) iwr);
		ret = sys_ioctl (fd, cmd, (unsigned long) r);
		ret = sys_ioctl(fd,cmd,(unsigned long)&req);
		return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg));
		return sys_ioctl(fd, cmd, (unsigned long) ifr);
		return sys_ioctl(fd, cmd, (unsigned long)tdata);
		return sys_ioctl(fd, cmd, (unsigned long)tn);
		return sys_ioctl(fd, cmd, (unsigned long) u_fprog64);
		return sys_ioctl (fd, cmd, (unsigned long)uifr);
		return sys_ioctl(fd, cmd, (unsigned long) u_ifreq64);
		return sys_ioctl(fd, PPPIOCSCOMPRESS, (unsigned long) odata);
		return sys_ioctl(fd, RTC_EPOCH_SET, arg);
		return sys_ioctl(fd, RTC_IRQP_SET, arg);
		return sys_ioctl(fd, USBDEVFS_BULK, (unsigned long)p);
		return sys_ioctl(fd, USBDEVFS_CONTROL, (unsigned long)p);
		ret = sys_quotactl(cmd, special, id, addr);
		ret = sys_quotactl(cmd, special, id, dqblk);
		ret = sys_quotactl(cmd, special, id, fsqstat);
		long compat_sys_get_mempolicy(int __user *policy,
		long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
		long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask,
		err = sys_get_mempolicy(policy, nm, nr_bits+1, addr, flags);
		return sys_mbind(start, len, mode, nm, nr_bits+1, flags);
		return sys_set_mempolicy(mode, nm, nr_bits+1);
		long compat_sys_mq_getsetattr(mqd_t mqdes,
		long compat_sys_mq_notify(mqd_t mqdes,
		long compat_sys_mq_open(const char __user *u_name,
		long compat_sys_mq_timedsend(mqd_t mqdes,
		ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
		ret = sys_mq_getsetattr(mqdes,
		return sys_mq_notify(mqdes, p);
		return sys_mq_open(u_name, oflag, mode, p);
		return sys_mq_timedreceive(mqdes, u_msg_ptr, msg_len,
		return sys_mq_timedsend(mqdes, u_msg_ptr, msg_len,
		int sys_fork(struct pt_regs *regs)
		int sys_vfork(struct pt_regs *regs)
		int sys_rt_sigreturn(struct pt_regs *regs)
		int sys_cacheflush(int operation, void __user *addr, size_t len)
		long sys_fork(void)
		long sys_vfork(void)
		long sys_rt_sigreturn(void)
		long sys_sigaltstack(const stack_t __user *uss, stack_t *uoss)
		long sys_sigreturn(void)
		long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
		long sys_cacheflush(unsigned long start, unsigned long end)
		long sys32_alarm(unsigned int seconds)
		long sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf)
		long sys32_mmap(struct mmap_arg_struct __user *arg)
		long sys32_old_select(struct sel_arg_struct __user *arg)
		long sys32_olduname(struct oldold_utsname __user *name)
		long sys32_pause(void)
		long sys32_personality(unsigned long personality)
		long sys32_pipe(int __user *fd)
		long sys32_sysctl(struct sysctl_ia32 __user *args32)
		long sys32_sysfs(int option, u32 arg1, u32 arg2)
		return compat_sys_msgctl(first, second, compat_ptr(ptr));
		return compat_sys_msgrcv(first, second, fifth, third,
		return compat_sys_msgsnd(first, second, third, compat_ptr(ptr));
		return compat_sys_semctl(first, second, third, compat_ptr(ptr));
		return compat_sys_semtimedop(first, compat_ptr(ptr), second,
		return compat_sys_shmat(first, second, third, version,
		return compat_sys_shmctl(first, second, compat_ptr(ptr));
		return sys_msgget((key_t) first, second);
		return sys_semget(first, second, third);
		return sys_semtimedop(first, compat_ptr(ptr), second, NULL);
		return sys_shmdt(compat_ptr(ptr));
		return sys_shmget(first, (unsigned)second, third);
		int sys_get_thread_area(struct user_desc __user *u_info)
		int sys_set_thread_area(struct user_desc __user *u_info)
		long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
		long sys_iopl(unsigned int level, struct pt_regs *regs)
		long sys_iopl(unsigned long regsp)
		int sys_rt_sigreturn(unsigned long __unused)
		int sys_sigaltstack(unsigned long bx)
		unsigned long sys_sigreturn(unsigned long __unused)
		long sys_rt_sigreturn(struct pt_regs *regs)
		int sys_vm86old(struct pt_regs regs)
		int sys_vm86(struct pt_regs regs)
		long sys_fork(struct pt_regs *regs)
		long sys_vfork(struct pt_regs *regs)
		static int lapic_nmi_resume(struct sys_device *dev)
		static int lapic_nmi_suspend(struct sys_device *dev, pm_message_t state)
		static struct sys_device device_lapic_nmi = {
		int sys_modify_ldt(int func, void __user *ptr,
		int sys_clone(struct pt_regs regs)
		int sys_execve(struct pt_regs regs)
		int sys_fork(struct pt_regs regs)
		int sys_vfork(struct pt_regs regs)
		int sys_olduname(struct oldold_utsname __user * name)
		int sys_uname(struct old_utsname __user * name)
		int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
		int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
		int sys_bfin_spinlock(int *spinlock)
		int sys_bfin_spinlock(int *spinlock)__attribute__((l1_text));
		int sys_getpagesize(void)
		int sys_sram_free(const void *addr)
		void *sys_dma_memcpy(void *dest, const void *src, size_t len)
		void *sys_sram_alloc(size_t size, unsigned long flags)
		long compat_sys_keyctl(u32 option,
		} /* end compat_sys_keyctl() */
		* - if you can, you should call sys_keyctl directly
		void vic_sys_interrupt(void);
		long compat_sys_kexec_load(unsigned long entry,
		long sys_kexec_load(unsigned long entry,
		long sys_accept(int, struct sockaddr __user *, int __user *);
		long sys_access(const char __user *filename, int mode);
		long sys_acct(const char __user *name);
		long sys_adjtimex(struct timex __user *txc_p);
		long sys_alarm(unsigned int seconds);
		long sys_bdflush(int func, long data);
		long sys_bind(int, struct sockaddr __user *, int);
		long sys_brk(unsigned long brk);
		long sys_chdir(const char __user *filename);
		long sys_chmod(const char __user *filename, mode_t mode);
		long sys_chroot(const char __user *filename);
		long sys_close(unsigned int fd);
		long sys_connect(int, struct sockaddr __user *, int);
		long sys_creat(const char __user *pathname, int mode);
		long sys_dup2(unsigned int oldfd, unsigned int newfd);
		long sys_dup(unsigned int fildes);
		long sys_epoll_create(int size);
		long sys_eventfd(unsigned int count);
		long sys_exit_group(int error_code);
		long sys_exit(int error_code);
		long sys_faccessat(int dfd, const char __user *filename, int mode);
		long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice);
		long sys_fadvise64(int fd, loff_t offset, size_t len, int advice);
		long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
		long sys_fchdir(unsigned int fd);
		long sys_fchmod(unsigned int fd, mode_t mode);
		long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group);
		long sys_fchown(unsigned int fd, uid_t user, gid_t group);
		long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
		long sys_fdatasync(unsigned int fd);
		long sys_flistxattr(int fd, char __user *list, size_t size);
		long sys_flock(unsigned int fd, unsigned int cmd);
		long sys_fremovexattr(int fd, const char __user *name);
		long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf);
		long sys_fstatfs(unsigned int fd, struct statfs __user *buf);
		long sys_fsync(unsigned int fd);
		long sys_ftruncate64(unsigned int fd, loff_t length);
		long sys_ftruncate(unsigned int fd, unsigned long length);
		long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);
		long sys_getcwd(char __user *buf, unsigned long size);
		long sys_getegid16(void);
		long sys_getegid(void);
		long sys_geteuid16(void);
		long sys_geteuid(void);
		long sys_getgid16(void);
		long sys_getgid(void);
		long sys_getgroups16(int gidsetsize, old_gid_t __user *grouplist);
		long sys_getgroups(int gidsetsize, gid_t __user *grouplist);
		long sys_gethostname(char __user *name, int len);
		long sys_getitimer(int which, struct itimerval __user *value);
		long sys_getpeername(int, struct sockaddr __user *, int __user *);
		long sys_getpgid(pid_t pid);
		long sys_getpgrp(void);
		long sys_getpid(void);
		long sys_getppid(void);
		long sys_getpriority(int which, int who);
		long sys_getresgid(gid_t __user *rgid, gid_t __user *egid, gid_t __user *sgid);
		long sys_getresuid(uid_t __user *ruid, uid_t __user *euid, uid_t __user *suid);
		long sys_getrusage(int who, struct rusage __user *ru);
		long sys_getsid(pid_t pid);
		long sys_getsockname(int, struct sockaddr __user *, int __user *);
		long sys_gettid(void);
		long sys_getuid16(void);
		long sys_getuid(void);
		long sys_inotify_init(void);
		long sys_inotify_rm_watch(int fd, u32 wd);
		long sys_io_destroy(aio_context_t ctx);
		long sys_ioperm(unsigned long from, unsigned long num, int on);
		long sys_ioprio_get(int which, int who);
		long sys_ioprio_set(int which, int who, int ioprio);
		long sys_io_setup(unsigned nr_reqs, aio_context_t __user *ctx);
		long sys_kill(int pid, int sig);
		long sys_listen(int, int);
		long sys_lookup_dcookie(u64 cookie64, char __user *buf, size_t len);
		long sys_madvise(unsigned long start, size_t len, int behavior);
		long sys_mkdirat(int dfd, const char __user * pathname, int mode);
		long sys_mkdir(const char __user *pathname, int mode);
		long sys_mlockall(int flags);
		long sys_mlock(unsigned long start, size_t len);
		long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
		long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
		long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);
		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);
		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);
		long sys_mq_unlink(const char __user *name);
		long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf);
		long sys_msgget(key_t key, int msgflg);
		long sys_msync(unsigned long start, size_t len, int flags);
		long sys_munlockall(void);
		long sys_munlock(unsigned long start, size_t len);
		long sys_munmap(unsigned long addr, size_t len);
		long sys##name(__SC_DECL##x(__VA_ARGS__))
		long sys##name(__SC_DECL##x(__VA_ARGS__));			asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__))		asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp);
		long sys_newfstat(unsigned int fd, struct stat __user *statbuf);
		long sys_newuname(struct new_utsname __user *name);
		long sys_nice(int increment);
		long sys_ni_syscall(void);
		long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim);
		long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int);
		long sys_oldumount(char __user *name);
		long sys_pause(void);
		long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn);
		long sys_personality(u_long personality);
		long sys_pipe2(int __user *, int);
		long sys_pipe(int __user *);
		long sys_ptrace(long request, long pid, long addr, long data);
		long sys_readahead(int fd, loff_t offset, size_t count);
		long sys_read(unsigned int fd, char __user *buf, size_t count);
		long sys_recv(int, void __user *, size_t, unsigned);
		long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags);
		long sys_restart_syscall(void);
		long sys_rmdir(const char __user *pathname);
		long sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize);
		long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
		long sys_sched_get_priority_max(int policy);
		long sys_sched_get_priority_min(int policy);
		long sys_sched_getscheduler(pid_t pid);
		long sys_sched_yield(void);
		long sys_semctl(int semid, int semnum, int cmd, union semun arg);
		long sys_semget(key_t key, int nsems, int semflg);
		long sys_send(int, void __user *, size_t, unsigned);
		long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags);
		long sys_setdomainname(char __user *name, int len);
		long sys_setfsgid16(old_gid_t gid);
		long sys_setfsgid(gid_t gid);
		long sys_setfsuid16(old_uid_t uid);
		long sys_setfsuid(uid_t uid);
		long sys_setgid16(old_gid_t gid);
		long sys_setgid(gid_t gid);
		long sys_setgroups16(int gidsetsize, old_gid_t __user *grouplist);
		long sys_setgroups(int gidsetsize, gid_t __user *grouplist);
		long sys_sethostname(char __user *name, int len);
		long sys_setpgid(pid_t pid, pid_t pgid);
		long sys_setpriority(int which, int who, int niceval);
		long sys_setregid16(old_gid_t rgid, old_gid_t egid);
		long sys_setregid(gid_t rgid, gid_t egid);
		long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid);
		long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid);
		long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid);
		long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid);
		long sys_setreuid16(old_uid_t ruid, old_uid_t euid);
		long sys_setreuid(uid_t ruid, uid_t euid);
		long sys_setsid(void);
		long sys_set_tid_address(int __user *tidptr);
		long sys_setuid16(old_uid_t uid);
		long sys_setuid(uid_t uid);
		long sys_sgetmask(void);
		long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
		long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
		long sys_shmdt(char __user *shmaddr);
		long sys_shmget(key_t key, size_t size, int flag);
		long sys_shutdown(int, int);
		long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask);
		long sys_signal(int sig, __sighandler_t handler);
		long sys_sigpending(old_sigset_t __user *set);
		long sys_socketcall(int call, unsigned long __user *args);
		long sys_socket(int, int, int);
		long sys_socketpair(int, int, int, int __user *);
		long sys_ssetmask(int newmask);
		long sys_stime(time_t __user *tptr);
		long sys_swapoff(const char __user *specialfile);
		long sys_swapon(const char __user *specialfile, int swap_flags);
		long sys_symlink(const char __user *old, const char __user *new);
		long sys_sync(void);
		long sys_sysctl(struct __sysctl_args __user *args);
		long sys_sysinfo(struct sysinfo __user *info);
		long sys_syslog(int type, char __user *buf, int len);
		long sys_tee(int fdin, int fdout, size_t len, unsigned int flags);
		long sys_tgkill(int tgid, int pid, int sig);
		long sys_timer_delete(timer_t timer_id);
		long sys_timerfd_create(int clockid, int flags);
		long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr);
		long sys_timer_getoverrun(timer_t timer_id);
		long sys_times(struct tms __user *tbuf);
		long sys_time(time_t __user *tloc);
		long sys_tkill(int pid, int sig);
		long sys_truncate64(const char __user *path, loff_t length);
		long sys_umask(int mask);
		long sys_umount(char __user *name, int flags);
		long sys_unlinkat(int dfd, const char __user * pathname, int flag);
		long sys_unlink(const char __user *pathname);
		long sys_unshare(unsigned long unshare_flags);
		long sys_uselib(const char __user *library);
		long sys_ustat(unsigned dev, struct ustat __user *ubuf);
		long sys_vhangup(void);
		long sys_waitpid(pid_t pid, int __user *stat_addr, int options);
		#define SYSCALL_DEFINE0(name)	   long sys_##name(void)
		#define SYSCALL_DEFINE(name) long sys_##name
		void vic_sys_interrupt(void);


Generated with ".fdsyscalls" from kernel sources."