Date: Sat, 31 May 2003 23:13:42 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Mike Makonnen <mtm@identd.net> Cc: threads@freebsd.org Subject: Re: libthr: thr_create(2): no kernel stack? Message-ID: <20030601061342.GA1075@dhcp01.pn.xcllnt.net> In-Reply-To: <20030601034817.OXXJ20810.pop015.verizon.net@kokeb.ambesa.net> References: <20030531072259.GA2408@athlon.pn.xcllnt.net> <20030601034817.OXXJ20810.pop015.verizon.net@kokeb.ambesa.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 31, 2003 at 11:48:15PM -0400, Mike Makonnen wrote: > On Sat, 31 May 2003 00:22:59 -0700 > > > > I'm porting libthr to ia64 and reached a point where I can actually > > do initial testing. I immediately hit upon a snafu in thr_create(2). > > The second bcopy (ie sys/kern/kern_thr.c:159) is panicing because > > the new thread (td0) does not have a frame (ie td_frame == NULL). > > Creating a frame is obviously the thing to do, but there's no kernel > > stack created for the new thread AFAICT. Without kernel thread. > > cpu_set_upcall() will also fail if we ever reach that point. > > > > Am I missing something here? > > I just took a look at this and it _did_ look funny, but it seems to work on i386 > so I did a little more digging and it seems that the stack frame is allocated in > the uma thread initialization routine thread_init(), which calls > cpu_thread_setup(). > This is currently undefined for ia64: ia64/ia64/vm_machdep.c: line 110 Ah, ok. Thanks. I got distracted by an ia64 specific hack in kern_thread.c. I just committed the removal of that hack. I too was in the process of figuring out why it worked on i386. You beat me to it ;-) Thanks. I'll commit an implementation shorty, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030601061342.GA1075>