From owner-freebsd-threads@FreeBSD.ORG Tue Aug 5 13:43:02 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A5A537B401 for ; Tue, 5 Aug 2003 13:43:02 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 358F443FA3 for ; Tue, 5 Aug 2003 13:43:01 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h75Kh0nj007005; Tue, 5 Aug 2003 16:43:00 -0400 (EDT) Date: Tue, 5 Aug 2003 16:43:00 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Marcel Moolenaar In-Reply-To: <20030805203213.GA879@athlon.pn.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: Good news: KSE on ia64 is starting to work X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2003 20:43:02 -0000 On Tue, 5 Aug 2003, Marcel Moolenaar wrote: > On Tue, Aug 05, 2003 at 04:12:01PM -0400, Daniel Eischen wrote: > > On Tue, 5 Aug 2003, Marcel Moolenaar wrote: > > > > > On Tue, Aug 05, 2003 at 02:02:04PM -0400, Daniel Eischen wrote: > > > > > > > > > > The patch does not contain ia64 (yet), but libpthread.ia64.diffs > > > > > does indeed have the code that deals with TP. > > > > > > > > Oh shoot. Terribly sorry :-( I didn't change the link > > > > to point to the latest patch file. If you grab it again, > > > > it should be updated. > > > > > > Attached the diff again pthread_md.h (ia64) after my commits. > > > Mostly merge conflict resolutions. > > > > Got it, thanks :) > > I got a fix: > In struct ia64_tp we define tp_tls as an array of char. If we > define it as an array of long double we automaticly have 16-byte > alignment of the static TLS, struct ia64_tp, struct tcb and > struct kcb. Allocating the TCB will then automaticly ensure that > the static TLS is properly aligned. I'm currently testing with > the following (re)definition of struct ia64_tp: > > struct ia64_tp { > struct tdv *tp_tdv; /* dynamic TLS */ > struct tcb *tp_self; > long double tp_tls[0]; /* static TLS */ > }; Sure; that was merely a placeholder so one (you) could replace it with whatever is needed. I assume this (static TLS) will have some predetermined size... > BTW: I'm also thinking about replacing tp_self by tp_thread and use > the following to get to the TCB: > > #define _CURTCB(tp) (struct tcb*)((uintptr_t)tp - offsetof(struct tcb, tcb_tp)) > > This should remove some double-indirections to get to struct pthread. > I haven't made the change locally yet. I first want to get the > show on the road. Sure, that works for me as well. -- Dan Eischen