Permalink
Browse files

Merge branch 'master' of git://gitorious.org/easyweb2/bionic into HEAD

  • Loading branch information...
2 parents f0552df + 8758a1a commit 91ef874ee4e1304b4906b3d37b95aac1a3409b52 @cyanogen cyanogen committed Nov 5, 2009
View
@@ -225,7 +225,13 @@ int __syslog:syslog(int, char *, int) 103
int init_module(void *, unsigned long, const char *) 128
int delete_module(const char*, unsigned int) 129
int klogctl:syslog(int, char *, int) 103
-
+# easyweb2:
+# 09-08-15
+# o Add system calls needed by udev daemon
+#
+int readlinkat(int, const char *, char *, size_t) 305
+int signalfd(int, const sigset_t *, int) 321
+
# futex
int futex(void *, int, int, void *, void *, int) 240
@@ -158,6 +158,8 @@ syscall_src += arch-arm/syscalls/__syslog.S
syscall_src += arch-arm/syscalls/init_module.S
syscall_src += arch-arm/syscalls/delete_module.S
syscall_src += arch-arm/syscalls/klogctl.S
+syscall_src += arch-arm/syscalls/readlinkat.S
+syscall_src += arch-arm/syscalls/signalfd.S
syscall_src += arch-arm/syscalls/futex.S
syscall_src += arch-arm/syscalls/epoll_create.S
syscall_src += arch-arm/syscalls/epoll_ctl.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type readlinkat, #function
+ .globl readlinkat
+ .align 4
+ .fnstart
+
+readlinkat:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_readlinkat
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type signalfd, #function
+ .globl signalfd
+ .align 4
+ .fnstart
+
+signalfd:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_signalfd
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
@@ -161,6 +161,8 @@ syscall_src += arch-x86/syscalls/__syslog.S
syscall_src += arch-x86/syscalls/init_module.S
syscall_src += arch-x86/syscalls/delete_module.S
syscall_src += arch-x86/syscalls/klogctl.S
+syscall_src += arch-x86/syscalls/readlinkat.S
+syscall_src += arch-x86/syscalls/signalfd.S
syscall_src += arch-x86/syscalls/futex.S
syscall_src += arch-x86/syscalls/epoll_create.S
syscall_src += arch-x86/syscalls/epoll_ctl.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type readlinkat, @function
+ .globl readlinkat
+ .align 4
+
+readlinkat:
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ pushl %esi
+ mov 20(%esp), %ebx
+ mov 24(%esp), %ecx
+ mov 28(%esp), %edx
+ mov 32(%esp), %esi
+ movl $__NR_readlinkat, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %esi
+ popl %edx
+ popl %ecx
+ popl %ebx
+ ret
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type signalfd, @function
+ .globl signalfd
+ .align 4
+
+signalfd:
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ mov 16(%esp), %ebx
+ mov 20(%esp), %ecx
+ mov 24(%esp), %edx
+ movl $__NR_signalfd, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %edx
+ popl %ecx
+ popl %ebx
+ ret
@@ -126,6 +126,8 @@
#define __NR_init_module (__NR_SYSCALL_BASE + 128)
#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_readlinkat (__NR_SYSCALL_BASE + 305)
+#define __NR_signalfd (__NR_SYSCALL_BASE + 321)
#define __NR_futex (__NR_SYSCALL_BASE + 240)
#define __NR_poll (__NR_SYSCALL_BASE + 168)
@@ -187,6 +187,8 @@ int __syslog (int, char *, int);
int init_module (void *, unsigned long, const char *);
int delete_module (const char*, unsigned int);
int klogctl (int, char *, int);
+int readlinkat (int, const char *, char *, size_t);
+int signalfd (int, const sigset_t *, int);
int futex (void *, int, int, void *, void *, int);
int epoll_create (int size);
int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
@@ -0,0 +1,41 @@
+/*
+ * include/linux/signalfd.h
+ *
+ * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
+ *
+ */
+
+#ifndef _LINUX_SIGNALFD_H
+#define _LINUX_SIGNALFD_H
+
+struct signalfd_siginfo {
+ __u32 ssi_signo;
+ __s32 ssi_errno;
+ __s32 ssi_code;
+ __u32 ssi_pid;
+ __u32 ssi_uid;
+ __s32 ssi_fd;
+ __u32 ssi_tid;
+ __u32 ssi_band;
+ __u32 ssi_overrun;
+ __u32 ssi_trapno;
+ __s32 ssi_status;
+ __s32 ssi_int;
+ __u64 ssi_ptr;
+ __u64 ssi_utime;
+ __u64 ssi_stime;
+ __u64 ssi_addr;
+
+ /*
+ * Pad strcture to 128 bytes. Remember to update the
+ * pad size when you add new memebers. We use a fixed
+ * size structure to avoid compatibility problems with
+ * future versions, and we leave extra space for additional
+ * members. We use fixed size members because this strcture
+ * comes out of a read(2) and we really don't want to have
+ * a compat on read(2).
+ */
+ __u8 __pad[48];
+};
+
+#endif /* _LINUX_SIGNALFD_H */
View
@@ -117,6 +117,7 @@ extern int pipe(int *);
extern int chroot(const char *);
extern int symlink(const char *, const char *);
extern int readlink(const char *, char *, size_t);
+extern int readlinkat(int, const char *, char *, size_t);
extern int chown(const char *, uid_t, gid_t);
extern int fchown(int, uid_t, gid_t);
extern int lchown(const char *, uid_t, gid_t);
@@ -19,8 +19,31 @@
struct siginfo;
+/*
+ * easyweb2:
+ * 09-08-15
+ * o Update sigset_t type for compatibility with kernel >= 2.6.30
+ */
+#ifndef EASYWEB2
#define NSIG 32
typedef unsigned long sigset_t;
+#else
+#define _NSIG 64
+
+#ifdef __i386__
+# define _NSIG_BPW 32
+#else
+# define _NSIG_BPW 64
+#endif
+
+#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
+
+typedef unsigned long old_sigset_t; /* at least 32 bits */
+
+typedef struct {
+ unsigned long sig[_NSIG_WORDS];
+} sigset_t;
+#endif
#endif
View
@@ -31,7 +31,16 @@ extern int __sigsuspend(int, int, unsigned int);
int sigsuspend(const sigset_t *_mask)
{
+/*
+ * easyweb2:
+ * 09-08-15
+ * o Update sigset_t type for compatibility with kernel >= 2.6.30
+ */
+#ifndef EASYWEB2
unsigned int mask = (unsigned int)*_mask;
+#else
+ unsigned int mask = _mask->sig[0];
+#endif
return __sigsuspend(0, 0, mask);
}
View
@@ -53,8 +53,18 @@ int sigwait(const sigset_t *set, int *sig)
sigset_t dummy_sigset;
} u;
+/*
+ * easyweb2:
+ * 09-08-15
+ * o Update sigset_t type for compatibility with kernel >= 2.6.30
+ */
+#ifndef EASYWEB2
u.kernel_sigset[0] = *set;
u.kernel_sigset[1] = 0; /* no real-time signals supported ? */
+#else
+ u.kernel_sigset[0] = set->sig[0];
+ u.kernel_sigset[1] = 0; /* no real-time signals supported */
+#endif
for (;;)
{
/* __rt_sigtimedwait can return EAGAIN or EINTR, we need to loop
Oops, something went wrong.

0 comments on commit 91ef874

Please sign in to comment.