From: Tom Hughes Date: Thu, 31 Mar 2005 09:09:07 +0000 (+0000) Subject: Implement the gettid system call which seems to have got lost in the merge. X-Git-Tag: svn/VALGRIND_3_0_0~828 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21d1184fb7ef5649e4a9355406cce646aa0b68f5;p=thirdparty%2Fvalgrind.git Implement the gettid system call which seems to have got lost in the merge. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3490 --- diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c index 45d3eb60ea..d7ae307bed 100644 --- a/coregrind/vg_syscalls.c +++ b/coregrind/vg_syscalls.c @@ -2956,6 +2956,12 @@ POST(sys_getppid) RES = 1; } +PRE(sys_gettid, 0) +{ + PRINT("sys_gettid ()"); + PRE_REG_READ0(long, "gettid"); +} + static void common_post_getrlimit(ThreadId tid, UWord a1, UWord a2) { POST_MEM_WRITE( a2, sizeof(struct vki_rlimit) ); diff --git a/coregrind/x86-linux/syscalls.c b/coregrind/x86-linux/syscalls.c index 50b063fcf6..3cbc044688 100644 --- a/coregrind/x86-linux/syscalls.c +++ b/coregrind/x86-linux/syscalls.c @@ -1246,7 +1246,7 @@ const struct SyscallTableEntry VGA_(syscall_table)[] = { GENXY(__NR_fcntl64, sys_fcntl64), // 221 GENX_(222, sys_ni_syscall), // 222 GENX_(223, sys_ni_syscall), // 223 - // (__NR_gettid, sys_gettid), // 224 */Linux + GENX_(__NR_gettid, sys_gettid), // 224 */Linux // (__NR_readahead, sys_readahead), // 225 */(Linux?) GENX_(__NR_setxattr, sys_setxattr), // 226