delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/08/06:02:03

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <47E442770B0CD511917E0040C77A460001FCE2@MAILEX>
From: Andy Younger <AndyY AT redlemon DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: Where is GetCurrentFiber?
Date: Thu, 8 Mar 2001 11:05:55 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

Ooopps, Wrong as always.. This will probably be somewhat better.

__inline PVOID GNU_GetFiberData(void)
{
	void* ret;
	__asm__ volatile ("
		movl	%%fs:0x10,%0
		movl	(%0),%0
	" : "=r" (ret)	/* allow use of reg eax,ebx,ecx,edx,esi,edi */
	  :
	  );
	return ret;
}

__inline PVOID GNU_GetCurrentFiber(void)
{
	void* ret;
	__asm__ volatile ("
		movl	%%fs:0x10,%0
	" : "=r" (ret)	/* allow use of reg eax,ebx,ecx,edx,esi,edi */
	  :
	  );
	return ret;
}


Andrew Younger
Programmer

Red Lemon Studios Ltd
175 West George Street, Glasgow G2 2LB, Scotland, U.K.
Tel +44 (0) 141 271 2000
Fax +44 (0) 141 271 2001

andyy AT redlemon DOT com
www.redlemon.com

It's a game thing!
-----------
The recipient acknowledges that Red Lemon Studios is unable to exercise
control over the content of information contained in transmissions made via
the Internet.  Red Lemon Studios hereby excludes any warranty as to the
quality or accuracy of any information contained in this message and any
liability of any kind for the information contained in it, or for its
transmission, reception, storage or use in any way whatsoever.

 

> -----Original Message-----
> From: cygwin-owner AT sources DOT redhat DOT com
> [mailto:cygwin-owner AT sources DOT redhat DOT com]On Behalf Of Andy Younger
> Sent: 08 March 2001 10:27
> To: cygwin AT cygwin DOT com
> Subject: RE: Where is GetCurrentFiber?
> 
> 
> Piqued by interest, I did a quick hack of these macros into 
> GNU assembly.
> Seems to work ok. Can someone see if these work, its been a 
> long time since
> I did inline assembly in GAS format.
> 
> 
> Andrew Younger
> Programmer
> 
> Red Lemon Studios Ltd
> 175 West George Street, Glasgow G2 2LB, Scotland, U.K.
> Tel +44 (0) 141 271 2000
> Fax +44 (0) 141 271 2001
> 
> andyy AT redlemon DOT com
> www.redlemon.com
> 
> It's a game thing!
> -----------
> The recipient acknowledges that Red Lemon Studios is unable 
> to exercise
> control over the content of information contained in 
> transmissions made via
> the Internet.  Red Lemon Studios hereby excludes any warranty 
> as to the
> quality or accuracy of any information contained in this 
> message and any
> liability of any kind for the information contained in it, or for its
> transmission, reception, storage or use in any way whatsoever.
> 
>  
> 
> > -----Original Message-----
> > From: cygwin-owner AT sources DOT redhat DOT com
> > [mailto:cygwin-owner AT sources DOT redhat DOT com]On Behalf Of 
> Corinna Vinschen
> > Sent: 07 March 2001 18:35
> > To: cygwin
> > Subject: Re: Where is GetCurrentFiber?
> > 
> > 
> > On Wed, Mar 07, 2001 at 01:10:08PM -0500, Larry Hall (RFK 
> > Partners, Inc) wrote:
> > > At 01:06 PM 3/7/2001, Corinna Vinschen wrote:
> > > >On Tue, Mar 06, 2001 at 10:57:02AM -0500, Larry Hall (RFK 
> > Partners, Inc) wrote:
> > > > > I don't think so.  GetCurrentFiber() and GetFiberData() 
> > are in user32.dll
> > > > > according to the MSDN.
> > > >
> > > >Hmm, which MSDN are you looking into? MSDN explicitely says
> > > >`GetCurrentFiber()' and `GetFiberData()' are macros, defined
> > > >in winnt.h.
> > > >
> > > >Corinna
> > > 
> > > 
> > > 
> > > Oops!  Quite right.  I didn't look very closely at that 
> > page and just clicked
> > > right along to "Requirements".  These are macros.  I guess 
> > they are improperly
> > > defined in Cygwin's winnt.h.
> > 
> > Yep. They are simply declared as functions, unfortunately.
> > 
> > Corinna
> > 
> > -- 
> > Corinna Vinschen                  Please, send mails 
> > regarding Cygwin to
> > Cygwin Developer                                
> mailto:cygwin AT cygwin DOT com
> Red Hat, Inc.
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> 

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019