Skip to content

Commit f320462

Browse files
Bug, 解决YY\Base\Sync\Interlocked.h VS2017编译失败
1 parent 53c5ffc commit f320462

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/YY/Base/Sync/Interlocked.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace YY
4545
inline int64_t __YYAPI Increment(volatile int64_t* _pAddend)
4646
{
4747
#ifdef _MSC_VER
48-
return (int64_t)_interlockedincrement64(_pAddend);
48+
return (int64_t)InterlockedIncrement64(_pAddend);
4949
#else
5050
return __sync_add_and_fetch(_pAddend, 1);
5151
#endif
@@ -93,7 +93,7 @@ namespace YY
9393
inline int64_t __YYAPI Decrement(volatile int64_t* _pAddend)
9494
{
9595
#ifdef _MSC_VER
96-
return (int64_t)_interlockeddecrement64(reinterpret_cast<long long volatile*>(_pAddend));
96+
return (int64_t)InterlockedDecrement64(reinterpret_cast<long long volatile*>(_pAddend));
9797
#else
9898
return __sync_sub_and_fetch(_pAddend, 1);
9999
#endif
@@ -435,7 +435,7 @@ namespace YY
435435
inline int64_t __YYAPI Exchange(volatile int64_t* _pDestination, int64_t _iExchange)
436436
{
437437
#ifdef _MSC_VER
438-
return (int64_t)_interlockedexchange64(reinterpret_cast<long long volatile*>(_pDestination), _iExchange);
438+
return (int64_t)InterlockedExchange64(reinterpret_cast<long long volatile*>(_pDestination), _iExchange);
439439
#else
440440
return __sync_lock_test_and_set(_pDestination, _iExchange);
441441
#endif

0 commit comments

Comments
 (0)