Added two syscalls: sendfile64 and rt_sigtimedwait. Had to #include

signal.h in vg_unsafe.h for the latter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1667
This commit is contained in:
Nicholas Nethercote
2003-06-03 12:55:40 +00:00
parent 20358ce449
commit 03527720dc
2 changed files with 30 additions and 0 deletions

View File

@@ -1121,6 +1121,22 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
break;
# endif
/* !!!!!!!!!! New, untested syscall, 3 Jun 03 !!!!!!!!!!! */
# if defined(__NR_sendfile64)
case __NR_sendfile64: /* syscall 239 */
/* ssize_t sendfile64(int out_df, int in_fd, loff_t *offset,
size_t count); */
MAYBE_PRINTF("sendfile64 ( %d, %d, %p, %d )\n",arg1,arg2,arg3,arg4);
if (arg3 != (UInt)NULL)
SYSCALL_TRACK( pre_mem_write, tst, "sendfile64(offset)",
arg3, sizeof(loff_t) );
KERNEL_DO_SYSCALL(tid,res);
if (!VG_(is_kerror)(res) && arg3 != (UInt)NULL ) {
VG_TRACK( post_mem_write, arg3, sizeof(loff_t) );
}
break;
# endif
/* !!!!!!!!!! New, untested syscalls, 7 Mar 02 !!!!!!!!!!! */
# if defined(__NR_pwrite)
@@ -1210,6 +1226,19 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
break;
# endif
# if defined(__NR_rt_sigtimedwait)
case __NR_rt_sigtimedwait: /* syscall 177 */
/* int sigtimedwait(const sigset_t *set, siginfo_t *info,
const struct timespec timeout); */
if (arg2 != (UInt)NULL)
SYSCALL_TRACK( pre_mem_write, tst, "sigtimedwait(info)", arg2,
sizeof(siginfo_t) );
KERNEL_DO_SYSCALL(tid,res);
if (!VG_(is_kerror)(res) && arg2 != (UInt)NULL)
VG_TRACK( post_mem_write, arg2, sizeof(siginfo_t) );
break;
# endif
case __NR_init_module: /* syscall 128 */
/* int init_module(const char *name, struct module *image); */
MAYBE_PRINTF("init_module ( %p, %p )\n", arg1, arg2 );

View File

@@ -55,6 +55,7 @@
#include <linux/sysctl.h> /* for struct __sysctl_args */
#include <linux/cdrom.h> /* for cd-rom ioctls */
#include <sys/user.h> /* for struct user_regs_struct et al */
#include <signal.h> /* for siginfo_t */
#define __USE_LARGEFILE64
#include <sys/stat.h> /* for struct stat */