Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2002 14:36:22 +0100
From:      Bernd Walter <ticso@cicely8.cicely.de>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        alpha@FreeBSD.org
Subject:   Re: {get,set,make,swap}context for alpha
Message-ID:  <20020104143622.A8703@cicely8.cicely.de>
In-Reply-To: <3C34C795.74B2B09C@vigrid.com>
References:  <3C34C795.74B2B09C@vigrid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 03, 2002 at 04:05:25PM -0500, Daniel Eischen wrote:
> I've got *context implemented and working for i386, but need some
> help getting them to work on the alpha.  Anyone here care to give
> it a try?  You can get them from:
> 
>   http://people.freebsd.org/~deischen/ucontext/uc-libc-sys.diffs
>   http://people.freebsd.org/~deischen/ucontext/uc-i386-standalone.tgz
>   http://people.freebsd.org/~deischen/ucontext/uc-alpha-standalone.tgz
> 
> The standalone tarballs contain a makefile, the source, and a test
> program so you don't have to patch your source tree and rebuild
> libc to test these functions.  Just do the following:
> 
>   $ cd /tmp
>   $ fetch http://people.freebsd.org/~deischen/ucontext/uc-alpha-standalone.tgz
>   $ tar -xzvf uc-alpha-standalone.tgz
>   $ cd alpha
>   $ make
>   $ ./test_context
> 
> The first problem I'm having is that getcontext is getting caught
> in an infinite loop.  After the call to sigprocmask, the return
> value is checked and the next branch instruction doesn't jump to
> the label; it jumps to a few instructions prior and repeats all
> over again.
> 
>         ...
> 	CALL(_sigprocmask)			/* see what's blocked */
> 	mov	s0, a0				/* restore ptr to ucontext */
>   -->	beq	v0, Lgc2			/* check for error */
> 	ldiq	v0, -1				/* return -1 */
> 	br	Lgcend
>   Lgc2:
> 	...

One problem I found is that you defined getcontext to be a LEAF
function, but actually call others.

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020104143622.A8703>