Where is GetCurrentFiber?

Corinna Vinschen cygwin@cygwin.com
Thu Mar 8 09:43:00 GMT 2001


Earnie? What about including that macros in w32api?

Corinna

On Thu, Mar 08, 2001 at 11:05:55AM -0000, Andy Younger wrote:
> 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@redlemon.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@sources.redhat.com
> > [ mailto:cygwin-owner@sources.redhat.com]On Behalf Of Andy Younger
> > Sent: 08 March 2001 10:27
> > To: cygwin@cygwin.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@redlemon.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@sources.redhat.com
> > > [ mailto:cygwin-owner@sources.redhat.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@cygwin.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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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



More information about the Cygwin mailing list