From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 19 21:58:46 2004 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0C6016A4CE for ; Mon, 19 Jul 2004 21:58:46 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8662A43D41 for ; Mon, 19 Jul 2004 21:58:46 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from dhcp50.pn.xcllnt.net (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i6JLwkho023401; Mon, 19 Jul 2004 14:58:46 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp50.pn.xcllnt.net (localhost [127.0.0.1]) i6JLwjlW012089; Mon, 19 Jul 2004 14:58:46 -0700 (PDT) (envelope-from marcel@dhcp50.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp50.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i6JLwjHu012088; Mon, 19 Jul 2004 14:58:45 -0700 (PDT) (envelope-from marcel) Date: Mon, 19 Jul 2004 14:58:45 -0700 From: Marcel Moolenaar To: "Georg-W. Koltermann" Message-ID: <20040719215845.GA12055@dhcp50.pn.xcllnt.net> References: <1090273635.1511.15.camel@localhost.muc.eu.mscsoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1090273635.1511.15.camel@localhost.muc.eu.mscsoftware.com> User-Agent: Mutt/1.4.2.1i cc: freebsd-emulation@freebsd.org Subject: Re: how to implement linux_gettid X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2004 21:58:47 -0000 On Mon, Jul 19, 2004 at 11:47:15PM +0200, Georg-W. Koltermann wrote: > > Could someone explain how our threading works when accessed from Linux, > and maybe give me a hint how gettid() should be implemented correctly? It depends. If user threading under linux compatibility is still implemented using fork(2), then you'll have a process per user thread. In that case it doesn't matter how threading is natively implemented. So, if fork(2) is the basis for threading, return td->td_proc->p_pid, otherwise you probably want to return td->td_tid. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net