------------------------------------------------------------------ */
/* Set to 1 to see IGNORED debugging messages. */
-static int show_IGNORED = 0;
+static int show_IGNORED = 1;
/* ---------------------------------------------------------------------
Pass pthread_ calls to Valgrind's request mechanism.
------------------------------------------------------------------ */
+int pthread_attr_init(pthread_attr_t *attr)
+{
+ ignored("pthread_attr_init");
+ return 0;
+}
+
+int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
+{
+ ignored("pthread_attr_setdetachstate");
+ return 0;
+}
+
+
int
pthread_create (pthread_t *__restrict __thread,
__const pthread_attr_t *__restrict __attr,
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{
- ignored("pthread_mutexattr_destroy");
- return 0;
+ ignored("pthread_mutexattr_destroy");
+ return 0;
+}
+
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
+{
+ ignored("pthread_mutexattr_settype");
+ return 0;
}
int pthread_mutex_lock(pthread_mutex_t *mutex)
return __libc_lseek(fildes, offset, whence);
}
+extern
+void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn));
+void longjmp(jmp_buf env, int val)
+{
+ __libc_longjmp(env, val);
+}
+
+extern
+int __libc_send(int s, const void *msg, size_t len, int flags);
+int send(int s, const void *msg, size_t len, int flags)
+{
+ return __libc_send(s, msg, len, flags);
+}
+
/*--------------------------------------------------*/
/* I've no idea what these are, but they get called quite a lot.
------------------------------------------------------------------ */
/* Set to 1 to see IGNORED debugging messages. */
-static int show_IGNORED = 0;
+static int show_IGNORED = 1;
/* ---------------------------------------------------------------------
Pass pthread_ calls to Valgrind's request mechanism.
------------------------------------------------------------------ */
+int pthread_attr_init(pthread_attr_t *attr)
+{
+ ignored("pthread_attr_init");
+ return 0;
+}
+
+int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
+{
+ ignored("pthread_attr_setdetachstate");
+ return 0;
+}
+
+
int
pthread_create (pthread_t *__restrict __thread,
__const pthread_attr_t *__restrict __attr,
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{
- ignored("pthread_mutexattr_destroy");
- return 0;
+ ignored("pthread_mutexattr_destroy");
+ return 0;
+}
+
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
+{
+ ignored("pthread_mutexattr_settype");
+ return 0;
}
int pthread_mutex_lock(pthread_mutex_t *mutex)
return __libc_lseek(fildes, offset, whence);
}
+extern
+void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn));
+void longjmp(jmp_buf env, int val)
+{
+ __libc_longjmp(env, val);
+}
+
+extern
+int __libc_send(int s, const void *msg, size_t len, int flags);
+int send(int s, const void *msg, size_t len, int flags)
+{
+ return __libc_send(s, msg, len, flags);
+}
+
/*--------------------------------------------------*/
/* I've no idea what these are, but they get called quite a lot.
------------------------------------------------------------------ */
/* Set to 1 to see IGNORED debugging messages. */
-static int show_IGNORED = 0;
+static int show_IGNORED = 1;
/* ---------------------------------------------------------------------
Pass pthread_ calls to Valgrind's request mechanism.
------------------------------------------------------------------ */
+int pthread_attr_init(pthread_attr_t *attr)
+{
+ ignored("pthread_attr_init");
+ return 0;
+}
+
+int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
+{
+ ignored("pthread_attr_setdetachstate");
+ return 0;
+}
+
+
int
pthread_create (pthread_t *__restrict __thread,
__const pthread_attr_t *__restrict __attr,
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{
- ignored("pthread_mutexattr_destroy");
- return 0;
+ ignored("pthread_mutexattr_destroy");
+ return 0;
+}
+
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
+{
+ ignored("pthread_mutexattr_settype");
+ return 0;
}
int pthread_mutex_lock(pthread_mutex_t *mutex)
return __libc_lseek(fildes, offset, whence);
}
+extern
+void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn));
+void longjmp(jmp_buf env, int val)
+{
+ __libc_longjmp(env, val);
+}
+
+extern
+int __libc_send(int s, const void *msg, size_t len, int flags);
+int send(int s, const void *msg, size_t len, int flags)
+{
+ return __libc_send(s, msg, len, flags);
+}
+
/*--------------------------------------------------*/
/* I've no idea what these are, but they get called quite a lot.
/* !!!!!!!!!! New, untested syscalls !!!!!!!!!!!!!!!!!!!!! */
+# if defined(__NR_mremap)
+ /* Is this really right? Perhaps it should copy the permissions
+ from the old area into the new. Unclear from the Linux man
+ pages what this really does. Also, the flags don't look like
+ they mean the same as the standard mmap flags, so that's
+ probably wrong too. */
+ case __NR_mremap: /* syscall 163 */
+ /* void* mremap(void * old_address, size_t old_size,
+ size_t new_size, unsigned long flags); */
+ if (VG_(clo_trace_syscalls))
+ VG_(printf)("mremap ( %p, %d, %d, 0x%x )\n",
+ arg1, arg2, arg3, arg4);
+ must_be_writable ( tst, "mremap(old_address)", arg1, arg2 );
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res)) {
+ /* Copied from munmap() wrapper. */
+ Addr start = arg1;
+ Addr length = arg2;
+ while ((start % VKI_BYTES_PER_PAGE) > 0) { start--; length++; }
+ while (((start+length) % VKI_BYTES_PER_PAGE) > 0) { length++; }
+ make_noaccess( start, length );
+ VG_(symtab_notify_munmap) ( start, length );
+ approximate_mmap_permissions( (Addr)res, arg3, arg4 );
+ }
+ break;
+# endif
+
case __NR_nice: /* syscall 34 */
/* int nice(int inc); */
if (VG_(clo_trace_syscalls))