From owner-freebsd-emulation Thu Sep 2 21:39:42 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 74CC814F78 for ; Thu, 2 Sep 1999 21:39:38 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id AAA02576; Fri, 3 Sep 1999 00:39:32 -0400 (EDT) (envelope-from luoqi) Date: Fri, 3 Sep 1999 00:39:32 -0400 (EDT) From: Luoqi Chen Message-Id: <199909030439.AAA02576@lor.watermarkgroup.com> To: luoqi@watermarkgroup.com, nox@jelal.kn-bremen.de, weigand@informatik.uni-erlangen.de, wine-devel@winehq.com Subject: Re: wine signal handlers lose %fs on FreeBSD Cc: freebsd-emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > I took a brief look at the exception code, it probably would not work > > under 4.0-current because the kernel uses %fs and signal handlers are > > called with a default %fs value (the same as the default %ds). You might > > need to restore %fs from the value in sigcontext at beginning of your > > signal handlers (yes, fs in sigcontext is set for 4.0-current. Regarding > > this, we could change the kernel, both -current and -stable, so that fs/gs > > are always saved in sigcontext when the signal is delivered, and restored > > during the signal trampoline, hence a consistent interface to application > > authors). Alternatively, we could change the kernel to call signal handlers > > with the original fs. > > Well, Wine can work with both ways, as long as there is way to find > out what method the OS uses! What should we use as a check? > Use #if __FreeBSD__ >= 4 , define FS_sig in this case. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message