> Thanks, that got me farther. I was able to coerce it
> to build the libraries and some applications. But,
> surprise surprise, the threading isn't working. In
> playing the the tprimes thread test program, I've found
> that it's aborting in needstack(). The first time
> it gets called, t->stk==f3333334, t->id==4280014785
> and t->stksize==10. The next time it gets called
> (using the same _Thread structure instance), t->stk==0,
> t->id==0, and t->stksize==213456. So it looks like
> something is scribbling on that structure.
That's probably because the stack pointer points at
the wrong end of the stack. There are some magic
#defines you can put in that change the meaning of
the stack pointer field that you pass to makecontext
on Solaris. In one mode you set ss_sp to point at
the top of thestack; in the other mode, the bottom.
The different versions of Solaris differ on which mode
is the default and whether the other mode is even
available. This is the specific reason I gave up. If someone
lined up Solaris 5.8, 5.9, and 5.10 boxes and wrote
code that worked on all of them, that would be fantastic.
g sigh $PLAN9/src/libthread/thread.c
You may be able to solve your particular problem by
changing that #if to #if 1.
> That's as far as I've gotten today. I'm trying to
> get vbackup running on Solaris. It's not critical,
> but it'd be nice.
Once you get the thread library working,
you will probably have to add support for
the Solaris FS to libdiskfs, unless it is the
same FFS that BSD uses.
Russ