Index: linux_machdep.c =================================================================== RCS file: /cvs/src/sys/emulation/linux/i386/linux_machdep.c,v retrieving revision 1.14 diff -u -p -u -r1.14 linux_machdep.c --- linux_machdep.c 20 Dec 2003 05:52:21 -0000 1.14 +++ linux_machdep.c 15 Mar 2004 02:10:30 -0000 @@ -823,6 +823,17 @@ linux_rt_sigsuspend(struct linux_rt_sigs } int +linux_gettid(struct linux_gettid_args *args) +{ + + /* just checking... */ + if (curthread->td_proc != NULL) + return (curthread->td_proc->p_pid); + else + return -1; +} + +int linux_pause(struct linux_pause_args *args) { struct thread *td = curthread; Index: linux_proto.h =================================================================== RCS file: /cvs/src/sys/emulation/linux/i386/linux_proto.h,v retrieving revision 1.12 diff -u -p -u -r1.12 linux_proto.h --- linux_proto.h 11 Mar 2004 09:53:19 -0000 1.12 +++ linux_proto.h 15 Mar 2004 02:10:30 -0000 @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.12 2004/03/11 09:53:19 hmp Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp + * $DragonFly$ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.5 2004/03/11 09:53:19 hmp Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -1252,6 +1252,13 @@ struct linux_fcntl64_args { l_uint cmd; char cmd_[PAD_(l_uint)]; l_ulong arg; char arg_[PAD_(l_ulong)]; }; +struct linux_gettid_args { +#ifdef _KERNEL + struct sysmsg sysmsg; +#endif + union usrmsg usrmsg; + register_t dummy; +}; #ifdef _KERNEL @@ -1409,6 +1416,7 @@ int linux_mincore (struct linux_mincore_ int linux_madvise (struct linux_madvise_args *); int linux_getdents64 (struct linux_getdents64_args *); int linux_fcntl64 (struct linux_fcntl64_args *); +int linux_gettid (struct linux_gettid_args *); #endif /* _KERNEL */ Index: linux_syscall.h =================================================================== RCS file: /cvs/src/sys/emulation/linux/i386/linux_syscall.h,v retrieving revision 1.12 diff -u -p -u -r1.12 linux_syscall.h --- linux_syscall.h 11 Mar 2004 09:53:19 -0000 1.12 +++ linux_syscall.h 15 Mar 2004 02:10:30 -0000 @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.12 2004/03/11 09:53:19 hmp Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp + * $DragonFly$ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.5 2004/03/11 09:53:19 hmp Exp */ #define LINUX_SYS_exit 1 @@ -213,5 +213,6 @@ #define LINUX_SYS_linux_madvise 219 #define LINUX_SYS_linux_getdents64 220 #define LINUX_SYS_linux_fcntl64 221 +#define LINUX_SYS_linux_gettid 224 #define LINUX_SYS_exit_group 252 #define LINUX_SYS_MAXSYSCALL 268 Index: linux_sysent.c =================================================================== RCS file: /cvs/src/sys/emulation/linux/i386/linux_sysent.c,v retrieving revision 1.12 diff -u -p -u -r1.12 linux_sysent.c --- linux_sysent.c 11 Mar 2004 09:53:19 -0000 1.12 +++ linux_sysent.c 15 Mar 2004 02:10:30 -0000 @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.12 2004/03/11 09:53:19 hmp Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp + * $DragonFly$ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.5 2004/03/11 09:53:19 hmp Exp */ #include "opt_compat.h" @@ -241,7 +241,7 @@ struct sysent linux_sysent[] = { { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */ { 0, (sy_call_t *)nosys }, /* 222 = none */ { 0, (sy_call_t *)nosys }, /* 223 = none */ - { 0, (sy_call_t *)nosys }, /* 224 = linux_gettid */ + { 0, (sy_call_t *)linux_gettid }, /* 224 = linux_gettid */ { 0, (sy_call_t *)nosys }, /* 225 = linux_readahead */ { 0, (sy_call_t *)nosys }, /* 226 = linux_setxattr */ { 0, (sy_call_t *)nosys }, /* 227 = linux_lsetxattr */ Index: linux_union.h =================================================================== RCS file: /cvs/src/sys/emulation/linux/i386/linux_union.h,v retrieving revision 1.8 diff -u -p -u -r1.8 linux_union.h --- linux_union.h 11 Mar 2004 09:53:19 -0000 1.8 +++ linux_union.h 15 Mar 2004 02:10:30 -0000 @@ -2,8 +2,8 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_union.h,v 1.8 2004/03/11 09:53:19 hmp Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp + * $DragonFly$ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.5 2004/03/11 09:53:19 hmp Exp */ union sysunion { @@ -165,4 +165,5 @@ union sysunion { struct linux_madvise_args linux_madvise; struct linux_getdents64_args linux_getdents64; struct linux_fcntl64_args linux_fcntl64; + struct linux_gettid_args linux_gettid; }; Index: syscalls.master =================================================================== RCS file: /cvs/src/sys/emulation/linux/i386/syscalls.master,v retrieving revision 1.5 diff -u -p -u -r1.5 syscalls.master --- syscalls.master 11 Mar 2004 09:53:19 -0000 1.5 +++ syscalls.master 15 Mar 2004 02:10:30 -0000 @@ -341,7 +341,7 @@ l_ulong arg); } 222 UNIMPL LINUX none 223 UNIMPL LINUX none -224 UNIMPL LINUX linux_gettid +224 STD LINUX { int linux_gettid(void); } 225 UNIMPL LINUX linux_readahead 226 UNIMPL LINUX linux_setxattr 227 UNIMPL LINUX linux_lsetxattr