From owner-freebsd-alpha Fri Jan 4 5:39:30 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 6364C37B41C for ; Fri, 4 Jan 2002 05:39:25 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g04DdGr55802; Fri, 4 Jan 2002 14:39:16 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g04DaPtx058404; Fri, 4 Jan 2002 14:36:25 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id g04DaOW15859; Fri, 4 Jan 2002 14:36:24 +0100 (CET) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g04DaNR08950; Fri, 4 Jan 2002 14:36:24 +0100 (CET) (envelope-from ticso) Date: Fri, 4 Jan 2002 14:36:22 +0100 From: Bernd Walter To: Daniel Eischen Cc: alpha@FreeBSD.org Subject: Re: {get,set,make,swap}context for alpha Message-ID: <20020104143622.A8703@cicely8.cicely.de> References: <3C34C795.74B2B09C@vigrid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C34C795.74B2B09C@vigrid.com> User-Agent: Mutt/1.3.23i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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