From owner-freebsd-alpha Thu Jan 3 13: 6: 9 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from net2.gendyn.com (nat2.gendyn.com [204.60.171.12]) by hub.freebsd.org (Postfix) with ESMTP id 8E39937B41A for ; Thu, 3 Jan 2002 13:06:02 -0800 (PST) Received: from [153.11.11.3] (helo=plunger.gdeb.com) by net2.gendyn.com with esmtp (Exim 2.12 #1) id 16MF3i-0006jA-00 for alpha@FreeBSD.org; Thu, 3 Jan 2002 16:05:54 -0500 Received: from clcrtr.gdeb.com ([153.11.109.11]) by plunger.gdeb.com with SMTP id PAA12652; Thu, 3 Jan 2002 15:50:38 -0500 (EST) Received: from vigrid.com (gpz.clc.gdeb.com [192.168.3.12]) by clcrtr.gdeb.com (8.11.4/8.11.4) with ESMTP id g03LFTK43205; Thu, 3 Jan 2002 16:15:30 -0500 (EST) (envelope-from eischen@vigrid.com) Message-ID: <3C34C795.74B2B09C@vigrid.com> Date: Thu, 03 Jan 2002 16:05:25 -0500 From: Daniel Eischen X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: alpha@FreeBSD.org Subject: {get,set,make,swap}context for alpha Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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: ... For more information on what *context are suppose to do, see: http://www.opengroup.org/onlinepubs/7908799/xsh/ucontext.h.html I don't subscribe to this list, so please keep me on the CC list. Thanks, -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message