/* When there is kernel support for more than 64 signals, we'll have to
switch to a new system call convention here. */
-static __inline__ _syscall2(int, osf_sigprocmask, int, how, unsigned long int, setval);
+static __inline__ _syscall2(int, osf_sigprocmask, int, how, unsigned long int, setval)
libc_hidden_proto(sigprocmask)
int
#if defined (__UCLIBC_MMAP_HAS_6_ARGS__) && defined (__NR_mmap)
#define __NR__mmap __NR_mmap
static __inline__ _syscall6 (__ptr_t, _mmap, __ptr_t, addr, size_t, len,
- int, prot, int, flags, int, fd, __off_t, offset);
+ int, prot, int, flags, int, fd, __off_t, offset)
__ptr_t mmap(__ptr_t addr, size_t len, int prot,
int flags, int fd, __off_t offset)
{
}
#elif defined (__NR_mmap)
# define __NR__mmap __NR_mmap
-static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer);
+static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
__ptr_t mmap(__ptr_t addr, size_t len, int prot,
int flags, int fd, __off_t offset)
{
libc_hidden_proto(mmap)
static _syscall6(__ptr_t, mmap2, __ptr_t, addr, size_t, len, int, prot,
- int, flags, int, fd, __off_t, pgoff);
+ int, flags, int, fd, __off_t, pgoff)
__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
{
#include <errno.h>
#include <sys/syscall.h>
-_syscall3 (__ptr_t, dma_memcpy, __ptr_t, dest, __ptr_t, src, size_t, len);
+_syscall3 (__ptr_t, dma_memcpy, __ptr_t, dest, __ptr_t, src, size_t, len)
#include <errno.h>
#include <sys/syscall.h>
-_syscall2 (__ptr_t, sram_alloc, size_t, len, unsigned long, flags);
+_syscall2 (__ptr_t, sram_alloc, size_t, len, unsigned long, flags)
#include <errno.h>
#include <sys/syscall.h>
-_syscall1 (__ptr_t, sram_free, __ptr_t, addr);
+_syscall1 (__ptr_t, sram_free, __ptr_t, addr)
#ifdef __NR_rt_sigtimedwait
#define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
static _syscall4(int, __rt_sigtimedwait, const sigset_t *, set, siginfo_t *, info,
- const struct timespec *, timeout, size_t, setsize);
+ const struct timespec *, timeout, size_t, setsize)
int sigwaitinfo(const sigset_t * set, siginfo_t * info)
{
libc_hidden_proto(__libc_fcntl64)
#define __NR___syscall_fcntl64 __NR_fcntl64
-static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg);
+static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg)
int __libc_fcntl64(int fd, int cmd, ...)
{
long arg;
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_exit (args)
#define __NR___syscall_exit __NR_exit
-static __inline__ _syscall1(void, __syscall_exit, int, status);
+static __inline__ _syscall1(void, __syscall_exit, int, status)
#endif
void attribute_noreturn _exit(int status)
libc_hidden_proto(chdir)
#define __NR___syscall_chdir __NR_chdir
-static __inline__ _syscall1(int, __syscall_chdir, const char *, path);
+static __inline__ _syscall1(int, __syscall_chdir, const char *, path)
int chdir(const char *path)
{
return __syscall_chdir(path);
libc_hidden_proto(chmod)
#define __NR___syscall_chmod __NR_chmod
-static __inline__ _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode);
+static __inline__ _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode)
int chmod(const char *path, mode_t mode)
{
# define __NR___syscall_chown __NR_chown
static __inline__ _syscall3(int, __syscall_chown, const char *, path,
- __kernel_uid_t, owner, __kernel_gid_t, group);
+ __kernel_uid_t, owner, __kernel_gid_t, group)
int chown(const char *path, uid_t owner, gid_t group)
{
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
#define __NR___syscall_chroot __NR_chroot
-static __inline__ _syscall1(int, __syscall_chroot, const char *, path);
+static __inline__ _syscall1(int, __syscall_chroot, const char *, path)
int chroot(const char *path)
{
#if defined(__UCLIBC_BROKEN_CREATE_MODULE__)
# define __NR___create_module __NR_create_module
-static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size);
+static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size)
/* By checking the value of errno, we know if we have been fooled
* by the syscall2 macro making a very high address look like a
* negative, so we we fix it up here. */
/* Alpha doesn't have the same problem, exactly, but a bug in older
kernels fails to clear the error flag. Clear it here explicitly. */
static __inline__ _syscall4(unsigned long, __create_module, const char *, name,
- size_t, size, size_t, dummy, size_t, err);
+ size_t, size, size_t, dummy, size_t, err)
unsigned long create_module(const char *name, size_t size)
{
return __create_module(name, size, 0, 0);
#define __NR___syscall_fchmod __NR_fchmod
static __inline__ _syscall2(int, __syscall_fchmod,
- int, fildes, __kernel_mode_t, mode);
+ int, fildes, __kernel_mode_t, mode)
int fchmod(int fildes, mode_t mode)
{
# define __NR___syscall_fchown __NR_fchown
static __inline__ _syscall3(int, __syscall_fchown, int, fd,
- __kernel_uid_t, owner, __kernel_gid_t, group);
+ __kernel_uid_t, owner, __kernel_gid_t, group)
int fchown(int fd, uid_t owner, gid_t group)
{
#include <sys/file.h>
#define __NR___syscall_flock __NR_flock
-static __inline__ _syscall2(int, __syscall_flock, int, fd, int, operation);
+static __inline__ _syscall2(int, __syscall_flock, int, fd, int, operation)
int flock(int fd, int operation)
{
libc_hidden_proto(fstat)
#define __NR___syscall_fstat __NR_fstat
-static __inline__ _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf);
+static __inline__ _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf)
int fstat(int fd, struct stat *buf)
{
#define __NR___syscall_fstat64 __NR_fstat64
static __inline__ _syscall2(int, __syscall_fstat64,
- int, filedes, struct kernel_stat64 *, buf);
+ int, filedes, struct kernel_stat64 *, buf)
int fstat64(int fd, struct stat64 *buf)
{
# define __NR___syscall_ftruncate64 __NR_ftruncate64
# if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
static __inline__ _syscall4(int, __syscall_ftruncate64, int, fd, uint32_t, pad,
- unsigned long, high_length, unsigned long, low_length);
+ unsigned long, high_length, unsigned long, low_length)
# else
static __inline__ _syscall3(int, __syscall_ftruncate64, int, fd,
- unsigned long, high_length, unsigned long, low_length);
+ unsigned long, high_length, unsigned long, low_length)
# endif
# endif
ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden;
#define __NR___syscall_getdents __NR_getdents
-static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count);
+static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count)
#ifdef __ASSUME_GETDENTS32_D_TYPE
ssize_t __getdents (int fd, char *buf, size_t nbytes)
# define __NR___syscall_getdents64 __NR_getdents64
-static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count);
+static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count)
ssize_t __getdents64 (int fd, char *buf, size_t nbytes) attribute_hidden;
ssize_t __getdents64 (int fd, char *buf, size_t nbytes)
#elif defined(__NR_getegid)
# define __NR___syscall_getegid __NR_getegid
-static __inline__ _syscall0(int, __syscall_getegid);
+static __inline__ _syscall0(int, __syscall_getegid)
gid_t getegid(void)
{
return (__syscall_getegid());
#elif defined(__NR_geteuid)
# define __NR___syscall_geteuid __NR_geteuid
-static __inline__ _syscall0(int, __syscall_geteuid);
+static __inline__ _syscall0(int, __syscall_geteuid)
uid_t geteuid(void)
{
return (__syscall_geteuid());
#define __NR___syscall_getgroups __NR_getgroups
static __inline__ _syscall2(int, __syscall_getgroups,
- int, size, __kernel_gid_t *, list);
+ int, size, __kernel_gid_t *, list)
int getgroups(int size, gid_t groups[])
{
#include <unistd.h>
#define __NR___syscall_getpgid __NR_getpgid
-static __inline__ _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid);
+static __inline__ _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid)
pid_t getpgid(pid_t pid)
{
#define __NR___syscall_getpriority __NR_getpriority
static __inline__ _syscall2(int, __syscall_getpriority,
- __priority_which_t, which, id_t, who);
+ __priority_which_t, which, id_t, who)
/* The return value of __syscall_getpriority is biased by this value
* to avoid returning negative values. */
#elif defined(__NR_getresgid)
# define __NR___syscall_getresgid __NR_getresgid
static __inline__ _syscall3(int, __syscall_getresgid, __kernel_gid_t *, rgid,
- __kernel_gid_t *, egid, __kernel_gid_t *, sgid);
+ __kernel_gid_t *, egid, __kernel_gid_t *, sgid)
int getresgid(gid_t * rgid, gid_t * egid, gid_t * sgid)
{
#elif defined(__NR_getresuid)
# define __NR___syscall_getresuid __NR_getresuid
static __inline__ _syscall3(int, __syscall_getresuid, __kernel_uid_t *, ruid,
- __kernel_uid_t *, euid, __kernel_uid_t *, suid);
+ __kernel_uid_t *, euid, __kernel_uid_t *, suid)
int getresuid(uid_t * ruid, uid_t * euid, uid_t * suid)
{
libc_hidden_proto(getsid)
#define __NR___syscall_getsid __NR_getsid
-static __inline__ _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid);
+static __inline__ _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid)
pid_t getsid(pid_t pid)
{
libc_hidden_proto(kill)
#define __NR___syscall_kill __NR_kill
-static __inline__ _syscall2(int, __syscall_kill, __kernel_pid_t, pid, int, sig);
+static __inline__ _syscall2(int, __syscall_kill, __kernel_pid_t, pid, int, sig)
int kill(pid_t pid, int sig)
{
#include <unistd.h>
#include <sys/klog.h>
#define __NR__syslog __NR_syslog
-static __inline__ _syscall3(int, _syslog, int, type, char *, buf, int, len);
+static __inline__ _syscall3(int, _syslog, int, type, char *, buf, int, len)
int klogctl(int type, char *buf, int len)
{
return (_syslog(type, buf, len));
# define __NR___syscall_lchown __NR_lchown
static __inline__ _syscall3(int, __syscall_lchown, const char *, path,
- __kernel_uid_t, owner, __kernel_gid_t, group);
+ __kernel_uid_t, owner, __kernel_gid_t, group)
int lchown(const char *path, uid_t owner, gid_t group)
{
# define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args)
# define __NR___syscall_llseek __NR__llseek
static __inline__ _syscall5(int, __syscall_llseek, int, fd, off_t, offset_hi,
- off_t, offset_lo, loff_t *, result, int, whence);
+ off_t, offset_lo, loff_t *, result, int, whence)
# endif
loff_t __libc_lseek64(int fd, loff_t offset, int whence)
#define __NR___syscall_lstat __NR_lstat
static __inline__ _syscall2(int, __syscall_lstat,
- const char *, file_name, struct kernel_stat *, buf);
+ const char *, file_name, struct kernel_stat *, buf)
int lstat(const char *file_name, struct stat *buf)
{
# define __NR___syscall_lstat64 __NR_lstat64
static __inline__ _syscall2(int, __syscall_lstat64, const char *, file_name,
- struct kernel_stat64 *, buf);
+ struct kernel_stat64 *, buf)
int lstat64(const char *file_name, struct stat64 *buf)
{
#define __NR___syscall_mkdir __NR_mkdir
static __inline__ _syscall2(int, __syscall_mkdir, const char *, pathname,
- __kernel_mode_t, mode);
+ __kernel_mode_t, mode)
int mkdir(const char *pathname, mode_t mode)
{
#define __NR___syscall_mknod __NR_mknod
static __inline__ _syscall3(int, __syscall_mknod, const char *, path,
- __kernel_mode_t, mode, __kernel_dev_t, dev);
+ __kernel_mode_t, mode, __kernel_dev_t, dev)
int mknod(const char *path, mode_t mode, dev_t dev)
{
#else
# define __NR__mmap __NR_mmap
-static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer);
+static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
__ptr_t mmap(__ptr_t addr, size_t len, int prot,
int flags, int fd, __off_t offset)
{
#define __NR___syscall_mmap2 __NR_mmap2
static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
- size_t, len, int, prot, int, flags, int, fd, off_t, offset);
+ size_t, len, int, prot, int, flags, int, fd, off_t, offset)
/* Some architectures always use 12 as page shift for mmap2() eventhough the
* real PAGE_SHIFT != 12. Other architectures use the same value as
# else
# define __NR___syscall_mmap2 __NR_mmap2
-static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, size_t, len,
- int, prot, int, flags, int, fd, off_t, offset);
+static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
+ size_t, len, int, prot, int, flags, int, fd,
+ off_t, offset)
/* Some architectures always use 12 as page shift for mmap2() eventhough the
* real PAGE_SHIFT != 12. Other architectures use the same value as
#ifdef __NR_nice
# define __NR___syscall_nice __NR_nice
-static __inline__ _syscall1(int, __syscall_nice, int, incr);
+static __inline__ _syscall1(int, __syscall_nice, int, incr)
#else
#define __NR___syscall_open __NR_open
static __inline__ _syscall3(int, __syscall_open, const char *, file,
- int, flags, __kernel_mode_t, mode);
+ int, flags, __kernel_mode_t, mode)
libc_hidden_proto(__libc_open)
int __libc_open(const char *file, int oflag, ...)
static __inline__ _syscall6(int, __syscall_fadvise64_64, int, fd,
unsigned long, high_offset, unsigned long, low_offset,
unsigned long, high_len, unsigned long, low_len,
- int, advice);
+ int, advice)
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
int ret = __syscall_fadvise64_64(fd,
# define __NR___syscall_pread __NR_pread
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
- size_t, count, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
# define __NR___syscall_pwrite __NR_pwrite
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- size_t, count, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
#define __NR___syscall_ptrace __NR_ptrace
static __inline__ _syscall4(long, __syscall_ptrace, enum __ptrace_request, request,
- __kernel_pid_t, pid, void*, addr, void*, data);
+ __kernel_pid_t, pid, void*, addr, void*, data)
long int
ptrace (enum __ptrace_request request, ...)
# if __WORDSIZE == 64
static __inline__ _syscall3(ssize_t, __readahead, int, fd,
- off_t, offset, size_t, count);
+ off_t, offset, size_t, count)
ssize_t readahead(int fd, off_t offset, size_t count)
{
# else
static __inline__ _syscall4(ssize_t, __readahead, int, fd,
- off_t, high_offset, off_t, low_offset, size_t, count);
+ off_t, high_offset, off_t, low_offset, size_t, count)
ssize_t readahead(int fd, off64_t offset, size_t count)
{
#include <sys/syscall.h>
#include <sys/reboot.h>
#define __NR__reboot __NR_reboot
-static __inline__ _syscall3(int, _reboot, int, magic, int, magic2, int, flag);
+static __inline__ _syscall3(int, _reboot, int, magic, int, magic2, int, flag)
int reboot(int flag)
{
return (_reboot((int) 0xfee1dead, 672274793, flag));
#define __NR___syscall_rename __NR_rename
static __inline__ _syscall2(int, __syscall_rename, const char *, oldpath,
- const char *, newpath);
+ const char *, newpath)
int rename(const char * oldpath, const char * newpath)
{
#if defined __NR_sched_getaffinity
#define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
static __inline__ _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid,
- size_t, cpusetsize, cpu_set_t *, cpuset);
+ size_t, cpusetsize, cpu_set_t *, cpuset)
int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
{
#define __NR___syscall_sched_getparam __NR_sched_getparam
static __inline__ _syscall2(int, __syscall_sched_getparam,
- __kernel_pid_t, pid, struct sched_param *, p);
+ __kernel_pid_t, pid, struct sched_param *, p)
int sched_getparam(pid_t pid, struct sched_param *p)
{
#include <sys/syscall.h>
#define __NR___syscall_sched_getscheduler __NR_sched_getscheduler
-static __inline__ _syscall1(int, __syscall_sched_getscheduler, __kernel_pid_t, pid);
+static __inline__ _syscall1(int, __syscall_sched_getscheduler, __kernel_pid_t, pid)
int sched_getscheduler(pid_t pid)
{
#define __NR___syscall_sched_rr_get_interval __NR_sched_rr_get_interval
static __inline__ _syscall2(int, __syscall_sched_rr_get_interval,
- __kernel_pid_t, pid, struct timespec *, tp);
+ __kernel_pid_t, pid, struct timespec *, tp)
int sched_rr_get_interval(pid_t pid, struct timespec *tp)
{
#define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
static __inline__ _syscall3(int, __syscall_sched_setaffinity, __kernel_pid_t, pid,
- size_t, cpusetsize, cpu_set_t *, cpuset);
+ size_t, cpusetsize, cpu_set_t *, cpuset)
static size_t __kernel_cpumask_size;
#define __NR___syscall_sched_setparam __NR_sched_setparam
static __inline__ _syscall2(int, __syscall_sched_setparam,
- __kernel_pid_t, pid, const struct sched_param *, p);
+ __kernel_pid_t, pid, const struct sched_param *, p)
int sched_setparam(pid_t pid, const struct sched_param *p)
{
#define __NR___syscall_sched_setscheduler __NR_sched_setscheduler
static __inline__ _syscall3(int, __syscall_sched_setscheduler,
- __kernel_pid_t, pid, int, policy, const struct sched_param *, p);
+ __kernel_pid_t, pid, int, policy, const struct sched_param *, p)
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p)
{
#else
# define __NR___syscall_setfsgid __NR_setfsgid
-static __inline__ _syscall1(int, __syscall_setfsgid, __kernel_gid_t, gid);
+static __inline__ _syscall1(int, __syscall_setfsgid, __kernel_gid_t, gid)
int setfsgid(gid_t gid)
{
#else
# define __NR___syscall_setfsuid __NR_setfsuid
-static __inline__ _syscall1(int, __syscall_setfsuid, __kernel_uid_t, uid);
+static __inline__ _syscall1(int, __syscall_setfsuid, __kernel_uid_t, uid)
int setfsuid(uid_t uid)
{
#else
# define __NR___syscall_setgid __NR_setgid
-static __inline__ _syscall1(int, __syscall_setgid, __kernel_gid_t, gid);
+static __inline__ _syscall1(int, __syscall_setgid, __kernel_gid_t, gid)
int setgid(gid_t gid)
{
#define __NR___syscall_setgroups __NR_setgroups
static __inline__ _syscall2(int, __syscall_setgroups,
- size_t, size, const __kernel_gid_t *, list);
+ size_t, size, const __kernel_gid_t *, list)
int setgroups(size_t size, const gid_t *groups)
{
#define __NR___syscall_setpgid __NR_setpgid
static __inline__ _syscall2(int, __syscall_setpgid,
- __kernel_pid_t, pid, __kernel_pid_t, pgid);
+ __kernel_pid_t, pid, __kernel_pid_t, pgid)
int setpgid(pid_t pid, pid_t pgid)
{
# define __NR___syscall_setregid __NR_setregid
static __inline__ _syscall2(int, __syscall_setregid,
- __kernel_gid_t, rgid, __kernel_gid_t, egid);
+ __kernel_gid_t, rgid, __kernel_gid_t, egid)
int setregid(gid_t rgid, gid_t egid)
{
# define __NR___syscall_setresgid __NR_setresgid
static __inline__ _syscall3(int, __syscall_setresgid,
- __kernel_gid_t, rgid, __kernel_gid_t, egid, __kernel_gid_t, sgid);
+ __kernel_gid_t, rgid, __kernel_gid_t, egid, __kernel_gid_t, sgid)
libc_hidden_proto(setresgid)
int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
# define __NR___syscall_setresuid __NR_setresuid
static __inline__ _syscall3(int, __syscall_setresuid,
- __kernel_uid_t, rgid, __kernel_uid_t, egid, __kernel_uid_t, sgid);
+ __kernel_uid_t, rgid, __kernel_uid_t, egid, __kernel_uid_t, sgid)
libc_hidden_proto(setresuid)
int setresuid(uid_t ruid, uid_t euid, uid_t suid)
# define __NR___syscall_setreuid __NR_setreuid
static __inline__ _syscall2(int, __syscall_setreuid,
- __kernel_uid_t, ruid, __kernel_uid_t, euid);
+ __kernel_uid_t, ruid, __kernel_uid_t, euid)
int setreuid(uid_t ruid, uid_t euid)
{
#else
# define __NR___syscall_setuid __NR_setuid
-static __inline__ _syscall1(int, __syscall_setuid, __kernel_uid_t, uid);
+static __inline__ _syscall1(int, __syscall_setuid, __kernel_uid_t, uid)
int setuid(uid_t uid)
{
#ifdef __NR_rt_sigpending
# define __NR___rt_sigpending __NR_rt_sigpending
-static __inline__ _syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size);
+static __inline__ _syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size)
int sigpending(sigset_t * set)
{
#ifdef __NR_rt_sigqueueinfo
# define __NR___libc_rt_sigqueueinfo __NR_rt_sigqueueinfo
-static __inline__ _syscall3(int, __libc_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value);
+static __inline__ _syscall3(int, __libc_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value)
/* Return any pending signal or wait for one for the given time. */
int sigqueue (pid_t pid, int sig, const union sigval val)
#ifdef __NR_rt_sigsuspend
# define __NR___rt_sigsuspend __NR_rt_sigsuspend
-static __inline__ _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size);
+static __inline__ _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size)
int __libc_sigsuspend(const sigset_t * mask)
{
#else
# define __NR___syscall_sigsuspend __NR_sigsuspend
static __inline__ _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b,
- unsigned long int, c);
+ unsigned long int, c)
int __libc_sigsuspend(const sigset_t * set)
{
#define __NR___syscall_stat __NR_stat
#undef stat
static __inline__ _syscall2(int, __syscall_stat,
- const char *, file_name, struct kernel_stat *, buf);
+ const char *, file_name, struct kernel_stat *, buf)
int stat(const char *file_name, struct stat *buf)
{
# include "xstatconv.h"
static __inline__ _syscall2(int, __syscall_stat64,
- const char *, file_name, struct kernel_stat64 *, buf);
+ const char *, file_name, struct kernel_stat64 *, buf)
int stat64(const char *file_name, struct stat64 *buf)
{
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_sync (args)
#define __NR___syscall_sync __NR_sync
-static __inline__ _syscall0(void, __syscall_sync);
+static __inline__ _syscall0(void, __syscall_sync)
#endif
void sync(void)
#define __NR___syscall_sync_file_range __NR_sync_file_range
static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd,
off_t, offset_hi, off_t, offset_lo,
- off_t, nbytes_hi, off_t, nbytes_lo, unsigned int, flags);
+ off_t, nbytes_hi, off_t, nbytes_lo, unsigned int, flags)
int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
{
return __syscall_sync_file_range(fd,
#define __NR___syscall_truncate64 __NR_truncate64
#if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
static __inline__ _syscall4(int, __syscall_truncate64, const char *, path,
- uint32_t, pad, unsigned long, high_length, unsigned long, low_length);
+ uint32_t, pad, unsigned long, high_length, unsigned long, low_length)
#else
static __inline__ _syscall3(int, __syscall_truncate64, const char *, path,
- unsigned long, high_length, unsigned long, low_length);
+ unsigned long, high_length, unsigned long, low_length)
#endif
#endif
#include <sys/stat.h>
#define __NR___syscall_umask __NR_umask
-static __inline__ _syscall1(__kernel_mode_t, __syscall_umask, __kernel_mode_t, mode);
+static __inline__ _syscall1(__kernel_mode_t, __syscall_umask, __kernel_mode_t, mode)
mode_t umask(mode_t mode)
{
#elif defined __NR_umount2
# define __NR___syscall_umount2 __NR_umount2
-static __inline__ _syscall2(int, __syscall_umount2, const char *, special_file, int, flags);
+static __inline__ _syscall2(int, __syscall_umount2, const char *, special_file, int, flags)
int umount(const char *special_file)
{
#define __NR___syscall_ustat __NR_ustat
static __inline__ _syscall2(int, __syscall_ustat,
- unsigned short int, kdev_t, struct ustat *, ubuf);
+ unsigned short int, kdev_t, struct ustat *, ubuf)
int ustat(dev_t dev, struct ustat *ubuf)
{
#define __NR___syscall_wait4 __NR_wait4
static __inline__ _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
- int *, status, int, opts, struct rusage *, rusage);
+ int *, status, int, opts, struct rusage *, rusage)
pid_t wait4(pid_t pid, int *status, int opts, struct rusage *rusage)
{
#include <errno.h>
#define __NR___vfork __NR_vfork
-attribute_hidden _syscall0(pid_t, __vfork);
+attribute_hidden _syscall0(pid_t, __vfork)
libc_hidden_proto(vfork)
weak_alias(__vfork,vfork)
libc_hidden_weak(vfork)
void * __curbrk attribute_hidden = 0;
#define __NR__brk __NR_brk
-attribute_hidden _syscall1(void *, _brk, void *, ptr);
+attribute_hidden _syscall1(void *, _brk, void *, ptr)
extern int __init_brk(void) attribute_hidden;
int
#define __NR___syscall_mmap2 __NR_mmap2
static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
- size_t, len, int, prot, int, flags, int, fd, off_t, offset);
+ size_t, len, int, prot, int, flags, int, fd, off_t, offset)
/* This is always 12, even on architectures where PAGE_SHIFT != 12. */
# ifndef MMAP2_PAGE_SHIFT
libc_hidden_proto(mmap)
_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
- int, flags, int, fd, __off_t, offset);
+ int, flags, int, fd, __off_t, offset)
libc_hidden_def(mmap)
#endif
_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
- int, flags, int, fd, __off_t, offset);
+ int, flags, int, fd, __off_t, offset)
libc_hidden_def(mmap)
# else /* O32 || N32 */
# define __NR___syscall_pread __NR_pread
static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
# else /* O32 || N32 */
# define __NR___syscall_pwrite __NR_pwrite
static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
extern __typeof(pread) __libc_pread;
# define __NR___syscall_pread __NR_pread
static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd,
- void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo);
+ void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
extern __typeof(pwrite) __libc_pwrite;
# define __NR___syscall_pwrite __NR_pwrite
static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd,
- const void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo);
+ const void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
void * __curbrk attribute_hidden = 0;
#define __NR__brk __NR_brk
-attribute_hidden _syscall1(void *, _brk, void *, ptr);
+attribute_hidden _syscall1(void *, _brk, void *, ptr)
extern int __init_brk (void) attribute_hidden;
int
extern __typeof(pread) __libc_pread;
# define __NR___syscall_pread __NR_pread
static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
extern __typeof(pwrite) __libc_pwrite;
# define __NR___syscall_pwrite __NR_pwrite
static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
void * __curbrk attribute_hidden = 0;
#define __NR__brk __NR_brk
-attribute_hidden _syscall1(void *, _brk, void *, ptr);
+attribute_hidden _syscall1(void *, _brk, void *, ptr)
extern int __init_brk (void) attribute_hidden;
int
libc_hidden_proto(mmap)
_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
- int, flags, int, fd, __off_t, offset);
+ int, flags, int, fd, __off_t, offset)
libc_hidden_def(mmap)
libc_hidden_proto(mmap)
_syscall6 (void *, mmap, void *, start, size_t, length, int, prot, int, flags,
- int, fd, off_t, offset);
+ int, fd, off_t, offset)
libc_hidden_def(mmap)
# define __NR___syscall_pread __NR_pread
/* On Xtensa, 64-bit values are aligned in even/odd register pairs. */
static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
# define __NR___syscall_pwrite __NR_pwrite
/* On Xtensa, 64-bit values are aligned in even/odd register pairs. */
static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{