[Glibc-bsd-commits] r4561 - in trunk/glibc-ports/kfreebsd: . x86_64
Petr Salinger
ps-guest at alioth.debian.org
Mon Jul 8 12:42:40 UTC 2013
Author: ps-guest
Date: 2013-06-22 08:04:19 +0000 (Sat, 22 Jun 2013)
New Revision: 4561
Modified:
trunk/glibc-ports/kfreebsd/syscalls-inline.h
trunk/glibc-ports/kfreebsd/x86_64/syscalls-internal.h
Log:
additional internal syscalls
Modified: trunk/glibc-ports/kfreebsd/syscalls-inline.h
===================================================================
--- trunk/glibc-ports/kfreebsd/syscalls-inline.h 2013-06-22 08:03:05 UTC (rev 4560)
+++ trunk/glibc-ports/kfreebsd/syscalls-inline.h 2013-06-22 08:04:19 UTC (rev 4561)
@@ -49,11 +49,13 @@
int __syscall_fork(void);
int __syscall_wait4(int pid, int *status, int options, struct rusage *rusage);
int __syscall_sigsuspend (const sigset_t *set);
+int __syscall_sigprocmask (int how, const sigset_t *set, sigset_t *oldset);
int __syscall_nanosleep (const struct timespec *requested_time, struct timespec *remaining);
libc_hidden_proto (__syscall_fcntl)
libc_hidden_proto (__syscall_fork)
libc_hidden_proto (__syscall_wait4)
libc_hidden_proto (__syscall_sigsuspend)
+libc_hidden_proto (__syscall_sigprocmask)
libc_hidden_proto (__syscall_nanosleep)
#endif
Modified: trunk/glibc-ports/kfreebsd/x86_64/syscalls-internal.h
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/syscalls-internal.h 2013-06-22 08:03:05 UTC (rev 4560)
+++ trunk/glibc-ports/kfreebsd/x86_64/syscalls-internal.h 2013-06-22 08:04:19 UTC (rev 4561)
@@ -56,6 +56,41 @@
result; \
})
+#define INTERNAL_SYSCALL_kill(name, err, nr, pid, sig) \
+(void)({ \
+ register long int _a1 = (long int) (pid); \
+ register long int _a2 = (long int) (sig); \
+ register long int result; \
+ asm volatile ( \
+ "syscall" \
+ : "=a" (result) \
+ : "0" ((long int) SYS_##name), \
+ "D" (_a1) \
+ "S" (_a2), \
+ : "memory", "cc", "cx", "dx", "r8", "r9", "r10", "r11"); \
+ result; \
+})
+
+#define INTERNAL_SYSCALL_write(name, err, nr, fd, buf, cnt) \
+(void)({ \
+ register long int _a1 = (long int) (fd); \
+ register long int _a2 = (long int) (buf); \
+ register long int _a3 = (long int) (cnt); \
+ register long int result; \
+ register long int _trash; \
+ asm volatile ( \
+ "syscall" \
+ : "=a" (result), \
+ "=d" (_trash) \
+ : "0" ((long int) SYS_##name), \
+ "D" (_a1), \
+ "S" (_a2), \
+ "d" (_a3) \
+ /* beware rdx is not preserved after syscall */ \
+ : "memory", "cc", "cx", "r8", "r9", "r10", "r11"); \
+ result; \
+})
+
#define INTERNAL_SYSCALL_writev(name, err, nr, fd, iov, cnt) \
(void)({ \
register long int _a1 = (long int) (fd); \
@@ -75,4 +110,5 @@
: "memory", "cc", "cx", "r8", "r9", "r10", "r11"); \
result; \
})
+
#endif
More information about the Glibc-bsd-commits
mailing list