Menu

#46 add extern to inline GetCurrentFiber

closed-accepted
w32api (251)
2001-08-10
2001-04-09
Danny Smith
No

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.

Discussion

  • Earnie Boyd

    Earnie Boyd - 2001-04-12

    Logged In: YES
    user_id=15438

    What is the point of this patch??? Why not just use the MACROed versions?

    Earnie.

     
  • Earnie Boyd

    Earnie Boyd - 2001-04-12
    • assigned_to: nobody --> earnie
     
  • Danny Smith

    Danny Smith - 2001-04-12

    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

     
  • Danny Smith

    Danny Smith - 2001-04-12

    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.

     
  • Danny Smith

    Danny Smith - 2001-04-14

    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

     
  • Danny Smith

    Danny Smith - 2001-04-16

    Logged In: YES
    user_id=11494

    I throw another hexagram.
    "Perseverence furthers" say the I Ching

     
  • Danny Smith

    Danny Smith - 2001-05-27

    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

     
  • Danny Smith

    Danny Smith - 2001-08-09

    Logged In: YES
    user_id=11494

    I've made one last change - to get rid of multiline string
    warning with asm code.

     
  • Danny Smith

    Danny Smith - 2001-08-09

    diff

     
  • Earnie Boyd

    Earnie Boyd - 2001-08-09
    • assigned_to: earnie --> dannysmith
     
  • Earnie Boyd

    Earnie Boyd - 2001-08-09

    Logged In: YES
    user_id=15438

    Danny, apply this patch.

     
  • Danny Smith

    Danny Smith - 2001-08-10
    • status: open --> closed-accepted
     
  • Danny Smith

    Danny Smith - 2001-08-10

    Logged In: YES
    user_id=11494

    Committed to CVS