The following patch adds extern to inline functions
defined in winnt.h and adds extern object to
libkernel32.a. These are linked in only if code is
compiled with no optimization or inline keyword
ignored for other reasons.
What macro'd versions.
Simply adding an extern in front of the __inline
GetCurrentFiber as per cgf patch removes the problem of
multilple definitions, but doesn't provide the promised
extern definition. GetCurrentFiber and GetFiberData are
not exported from any dll that I know of. I can't find it
in winnt/system32. The patch puts these objects into
libkernel32.a so that they exist when compiler refuses to
inline. It also changes __inline to __inline__ which is
the documented form of the keyword in GNUC.
Are you suggesting that the inline asm code be rewitten as
a macro?
Danny
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is revised patch. The original asm code in
GetFiberData and GetCurrentFiber was also wrong, and caused
access volation. Revised patch corrects asm as well as the
extern __inline__ interface.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally, I think. There was a mix up in last patch (asm
code for the 2 functions was swapped). This one I've
checked with the PSDK sample project called Fibers. It does
work. Now I can eat some Easter eggs.
Danny
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=15438
What is the point of this patch??? Why not just use the MACROed versions?
Earnie.
Logged In: YES
user_id=11494
What macro'd versions.
Simply adding an extern in front of the __inline
GetCurrentFiber as per cgf patch removes the problem of
multilple definitions, but doesn't provide the promised
extern definition. GetCurrentFiber and GetFiberData are
not exported from any dll that I know of. I can't find it
in winnt/system32. The patch puts these objects into
libkernel32.a so that they exist when compiler refuses to
inline. It also changes __inline to __inline__ which is
the documented form of the keyword in GNUC.
Are you suggesting that the inline asm code be rewitten as
a macro?
Danny
Logged In: YES
user_id=11494
This is revised patch. The original asm code in
GetFiberData and GetCurrentFiber was also wrong, and caused
access volation. Revised patch corrects asm as well as the
extern __inline__ interface.
Logged In: YES
user_id=11494
Finally, I think. There was a mix up in last patch (asm
code for the 2 functions was swapped). This one I've
checked with the PSDK sample project called Fibers. It does
work. Now I can eat some Easter eggs.
Danny
Logged In: YES
user_id=11494
I throw another hexagram.
"Perseverence furthers" say the I Ching
Logged In: YES
user_id=11494
Finally some one actually has tried to use GetCurrentFiber.
http://sources.redhat.com/ml/cygwin/2001-05/msg01512.html
The patch I submitted around Easter, has this fixed.
Danny
Logged In: YES
user_id=11494
I've made one last change - to get rid of multiline string
warning with asm code.
diff
Logged In: YES
user_id=15438
Danny, apply this patch.
Logged In: YES
user_id=11494
Committed to CVS