Skip to content

Commit d233430

Browse files
berrangequeueRAM
authored andcommitted
linux-user: assume __NR_gettid always exists
The gettid syscall was introduced in Linux 2.4.11. This is old enough that we can assume it always exists and thus not bother with the conditional backcompat logic. Signed-off-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Reviewed-by: Laurent Vivier <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
1 parent 32ab296 commit d233430

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

linux-user/syscall.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,8 @@ static inline type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,
259259
#define TARGET_NR__llseek TARGET_NR_llseek
260260
#endif
261261

262-
#ifdef __NR_gettid
263262
_syscall0(int, gettid)
264-
#else
265-
/* This is a replacement for the host gettid() and must return a host
266-
errno. */
267-
static int gettid(void) {
268-
return -ENOSYS;
269-
}
270-
#endif
263+
271264
#if defined(TARGET_NR_getdents) && defined(__NR_getdents)
272265
_syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count);
273266
#endif

0 commit comments

Comments
 (0)