Opened 11 years ago

Closed 10 years ago

#6776 closed Support Requests (duplicate)

InterlockedExchangeAdd and InterlockedExchange as managed code

Reported by: lthomas Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.49.0 Severity: Problem
Keywords: InterlockedExchangeAdd Cc:

Description

Hi there,

According this ticket <https://svn.boost.org/trac/boost/ticket/6325> reported to version 1.48.0, I'm still getting the same errors in different parts.

To avoid it, I'm using the following workaround:

boost/asio/detail/impl/winsock_init.ipp:39

long result = (1?::WSAStartup(MAKEWORD(major, minor), &wsa_data) : InterlockedExchangeAdd64((volatile LONG64 *)0,(LONG64) 0));

boost/asio/detail/impl/win_iocp_io_service.ipp:89

InterlockedExchange64((volatile LONG64 *)&shutdown_,(LONG64) 1);

Could you please verify if is it Ok ?

Change History (3)

comment:1 by lthomas, 11 years ago

Type: BugsSupport Requests

comment:2 by chris_kohlhoff, 10 years ago

This fix is not ok. The InterlockedExchange64 function only available from Windows Vista on. Please propose an alternative patch.

comment:3 by chris_kohlhoff, 10 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #6325. Please use that ticket when proposing potential patches.

Note: See TracTickets for help on using tickets.