This further patch implements several syscalls used by firefox on debian-kfreebsd-amd64 which were not yet implemented (or for some reason had an implementation that was commented out)
Jeff
Description: Implement several new syscalls for freebsd This fixes several unimplemented syscall messages seen when running firefox under valgrind. It is cumulative with my initial patch and probably should be squashed in. . Author: Jeff Epler <jep...@unpythonic.net> Bug-Debian: http://bugs.debian.org/702729 --- valgrind-3.8.1.orig/coregrind/m_syswrap/syswrap-freebsd.c +++ valgrind-3.8.1/coregrind/m_syswrap/syswrap-freebsd.c @@ -1696,6 +1696,7 @@ POST(sys_sched_getparam) { POST_MEM_WRITE( ARG2, sizeof(struct vki_sched_param) ); } +#endif PRE(sys_sched_getscheduler) { @@ -1713,6 +1714,7 @@ PRE(sys_sched_setscheduler) ARG3, sizeof(struct vki_sched_param)); } +#if 0 PRE(sys_sched_yield) { *flags |= SfMayBlock; @@ -2222,6 +2224,26 @@ POST(sys__umtx_unlock) POST_MEM_WRITE(ARG1, sizeof(struct vki_umtx)); } +PRE(sys_rtprio) +{ + PRINT( "sys_rtprio_thread ( %ld, %ld, %#lx )", ARG1, ARG2, ARG3 ); + PRE_REG_READ3(long, "rtprio_thread", + int, "function", __vki_pid_t, "lwpid", struct vki_rtprio *, "rtp"); + if (ARG1 == VKI_RTP_SET) { + PRE_MEM_READ( "rtprio(set)", ARG3, sizeof(struct vki_rtprio)); + } else if (ARG1 == VKI_RTP_LOOKUP) { + PRE_MEM_WRITE( "rtprio(lookup)", ARG3, sizeof(struct vki_rtprio)); + } else { + /* PHK ?? */ + } +} +POST(sys_rtprio) +{ + if (ARG1 == VKI_RTP_LOOKUP && RES == 0) + POST_MEM_WRITE( ARG3, sizeof(struct vki_rtprio)); +} + + PRE(sys_rtprio_thread) { PRINT( "sys_rtprio_thread ( %ld, %ld, %#lx )", ARG1, ARG2, ARG3 ); @@ -3797,7 +3819,7 @@ const SyscallTableEntry ML_(syscall_tabl BSDXY(__NR_uname, sys_uname), // 164 BSDX_(__NR_sysarch, sys_sysarch), // 165 -// BSDXY(__NR_rtprio, sys_rtprio), // 166 + BSDXY(__NR_rtprio, sys_rtprio), // 166 // nosys 167 // nosys 168 @@ -4001,8 +4023,8 @@ const SyscallTableEntry ML_(syscall_tabl // BSDXY(__NR_sched_setparam, sys_sched_setparam), // 327 // BSDXY(__NR_sched_getparam, sys_sched_getparam), // 328 -// BSDX_(__NR_sched_setscheduler, sys_sched_setscheduler), // 329 -// BSDX_(__NR_sched_getscheduler, sys_sched_getscheduler), // 330 + BSDX_(__NR_sched_setscheduler, sys_sched_setscheduler), // 329 + BSDX_(__NR_sched_getscheduler, sys_sched_getscheduler), // 330 BSDX_(__NR_sched_yield, sys_sched_yield), // 331 BSDX_(__NR_sched_get_priority_max, sys_sched_get_priority_max), // 332
signature.asc
Description: Digital signature