Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1242 InterlockedIncrement() WinAPI prototype missing volatile

closed-fixed
nobody
2009-01-21
2009-01-20
No

The prototypes of the WinAPIs InterlockedIncrement(), InterlockedDecrement() and InterlockedExchange() (and possibly others) in winbase.h are declared without the 'volatile' modifier, whereas in MSDN documentation they are volatile. This can cause compilation problems, and workarounds ignoring 'volatile' can potentially be dangerous

Discussion

    • summary: InterlockedIncrement() WinAPI prototype volatile missing --> InterlockedIncrement() WinAPI prototype missing volatile
     
    • priority: 5 --> 8
     
    • priority: 8 --> 6
     
  • Danny Smith
    Danny Smith
    2009-01-21

    • milestone: --> IINR_-_Include_In_Next_Release
    • status: open --> closed-fixed
     
  • Danny Smith
    Danny Smith
    2009-01-21

    This was fixed by:
    2008-06-25 Brandon Sneed <nivenh@sourceware.org>

    \* include/winbase.h \(InterlockedIncrement, InterlockedDecrement,
    InterlockedCompareExchange, InterlockedExchange, 
    InterlockedCompareExchangePointer, InterlockedExchangeAdd,
    InterlockedExchangePointer\): Modified from PLONG to LONG volatile \*.
    Bug reported by Erik Blake.
    

    Please update your version on w32api

     
  • Thank you for the fast response, I am sorry I missed to check this one against the latest version