From owner-freebsd-threads@FreeBSD.ORG Tue Aug 5 13:32:15 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 4B7BB37B401; Tue, 5 Aug 2003 13:32:15 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42C8F43FA3; Tue, 5 Aug 2003 13:32:14 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h75KWEwO033053; Tue, 5 Aug 2003 13:32:14 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h75KWDYn000918; Tue, 5 Aug 2003 13:32:13 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h75KWDb3000917; Tue, 5 Aug 2003 13:32:13 -0700 (PDT) (envelope-from marcel) Date: Tue, 5 Aug 2003 13:32:13 -0700 From: Marcel Moolenaar To: deischen@freebsd.org Message-ID: <20030805203213.GA879@athlon.pn.xcllnt.net> References: <20030805200546.GA825@athlon.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i 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 List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2003 20:32:15 -0000 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 */ }; 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. FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net