Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 17 Nov 2002 13:49:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 17 Nov 2002 13:49:32 -0500 Received: from mx1.elte.hu ([157.181.1.137]:56494 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Sun, 17 Nov 2002 13:49:31 -0500 Date: Sun, 17 Nov 2002 21:13:00 +0100 (CET) From: Ingo Molnar Reply-To: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Luca Barbieri , Ulrich Drepper Subject: Re: [patch] threading fix, tid-2.5.47-A3 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1176 Lines: 39 this is the first patch, the introduction of the sys_set_thread_address() syscall. It returns the PID so that the newly initialized 'initial thread' does not have to do an additional sys_gettid() call. Ingo --- linux/arch/i386/kernel/entry.S.orig 2002-11-17 20:53:52.000000000 +0100 +++ linux/arch/i386/kernel/entry.S 2002-11-17 20:54:55.000000000 +0100 @@ -767,6 +767,7 @@ .long sys_epoll_ctl /* 255 */ .long sys_epoll_wait .long sys_remap_file_pages + .long sys_set_tid_address .rept NR_syscalls-(.-sys_call_table)/4 --- linux/kernel/fork.c.orig 2002-11-17 20:53:52.000000000 +0100 +++ linux/kernel/fork.c 2002-11-17 20:54:55.000000000 +0100 @@ -676,6 +676,13 @@ p->flags = new_flags; } +asmlinkage int sys_set_tid_address(int *user_tid) +{ + current->user_tid = user_tid; + + return current->pid; +} + /* * This creates a new process as a copy of the old one, * but does not actually start it yet. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/