Add getitimer (Pascal Massimino)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@288 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/vg_syscall_mem.c b/vg_syscall_mem.c
index 6d4e497..1ffac13 100644
--- a/vg_syscall_mem.c
+++ b/vg_syscall_mem.c
@@ -422,6 +422,18 @@
 
       /* !!!!!!!!!! New, untested syscalls !!!!!!!!!!!!!!!!!!!!! */
 
+      case __NR_getitimer: /* syscall 105 */
+         /* int getitimer(int which, struct itimerval *value); */
+         if (VG_(clo_trace_syscalls))
+            VG_(printf)("getitimer ( %d, %p )\n", arg1, arg2);
+         must_be_writable( tst, "getitimer(timer)", arg2, 
+                           sizeof(struct itimerval) );
+         KERNEL_DO_SYSCALL(tid,res);
+         if (!VG_(is_kerror)(res) && arg2 != (Addr)NULL) {
+            make_readable(arg2, sizeof(struct itimerval));
+         }
+         break;
+
 #     if defined(__NR_syslog)
       case __NR_syslog: /* syscall 103 */
          /* int syslog(int type, char *bufp, int len); */