lock 原子操作

 
text:7C809806 ; Exported entry 545. InterlockedIncrement
.text:7C809806
.text:7C809806 ; =============== S U B R O U T I N E =======================================
.text:7C809806
.text:7C809806
.text:7C809806 ; LONG __stdcall InterlockedIncrement(volatile LONG *lpAddend)
.text:7C809806                 public _InterlockedIncrement@4
.text:7C809806 _InterlockedIncrement@4 proc near       ; CODE XREF: CreatePipe(x,x,x,x)+57p
.text:7C809806                                         ; BasepCreateDefaultTimerQueue()+41p ...
.text:7C809806
.text:7C809806 lpAddend        = dword ptr  4
.text:7C809806
.text:7C809806                 mov     ecx, [esp+lpAddend]
.text:7C80980A                 mov     eax, 1
.text:7C80980F
.text:7C80980F loc_7C80980F:                           ; DATA XREF: .data:_BasepLockPrefixTableo
.text:7C80980F                 lock xadd [ecx], eax
.text:7C809813                 inc     eax
.text:7C809814                 retn    4
.text:7C809814 _InterlockedIncrement@4 endp
.text:7C809814
.text:7C809814 ; ---------------------------------------------------------------------------
.text:7C809817                 db 8Dh, 49h, 0
.text:7C80981A ; Exported entry 541. InterlockedDecrement
.text:7C80981A
.text:7C80981A ; =============== S U B R O U T I N E =======================================
.text:7C80981A
.text:7C80981A
.text:7C80981A ; LONG __stdcall InterlockedDecrement(volatile LONG *lpAddend)
.text:7C80981A                 public _InterlockedDecrement@4
.text:7C80981A _InterlockedDecrement@4 proc near       ; CODE XREF: BasepCreateDefaultTimerQueue()+181D8p
.text:7C80981A                                         ; DATA XREF: .text:off_7C802654o
.text:7C80981A
.text:7C80981A lpAddend        = dword ptr  4
.text:7C80981A
.text:7C80981A                 mov     ecx, [esp+lpAddend]
.text:7C80981E                 mov     eax, 0FFFFFFFFh
.text:7C809823
.text:7C809823 loc_7C809823:                           ; DATA XREF: .data:7C885010o
.text:7C809823                 lock xadd [ecx], eax
.text:7C809827                 dec     eax
.text:7C809828                 retn    4
.text:7C809828 _InterlockedDecrement@4 endp
.text:7C809828
.text:7C809828 ; ---------------------------------------------------------------------------
.text:7C80982B                 db 8Dh, 49h, 0
.text:7C80982E ; Exported entry 542. InterlockedExchange
.text:7C80982E
.text:7C80982E ; =============== S U B R O U T I N E =======================================
.text:7C80982E
.text:7C80982E
.text:7C80982E ; LONG __stdcall InterlockedExchange(volatile LONG *Target, LONG Value)
.text:7C80982E                 public _InterlockedExchange@8
.text:7C80982E _InterlockedExchange@8 proc near        ; CODE XREF: UpdateUserInfoCache()+2Cp
.text:7C80982E                                         ; BasepCreateDefaultTimerQueue()+12p ...
.text:7C80982E
.text:7C80982E Target          = dword ptr  4
.text:7C80982E Value           = dword ptr  8
.text:7C80982E
.text:7C80982E                 mov     ecx, [esp+Target]
.text:7C809832                 mov     edx, [esp+Value]
.text:7C809836                 mov     eax, [ecx]
.text:7C809838
.text:7C809838 loc_7C809838:                           ; CODE XREF: InterlockedExchange(x,x)+Ej
.text:7C809838                                         ; DATA XREF: .data:7C88501Co
.text:7C809838                 lock cmpxchg [ecx], edx
.text:7C80983C                 jnz     short loc_7C809838
.text:7C80983E                 retn    8
.text:7C80983E _InterlockedExchange@8 endp
.text:7C80983E
.text:7C80983E ; ---------------------------------------------------------------------------
.text:7C809841                 align 2
.text:7C809842 ; Exported entry 540. InterlockedCompareExchange
.text:7C809842
.text:7C809842 ; =============== S U B R O U T I N E =======================================
.text:7C809842
.text:7C809842
.text:7C809842 ; LONG __stdcall InterlockedCompareExchange(volatile LONG *Destination, LONG Exchange, LONG Comperand)
.text:7C809842                 public _InterlockedCompareExchange@12
.text:7C809842 _InterlockedCompareExchange@12 proc near
.text:7C809842                                         ; CODE XREF: BaseComputeProcessDllPath(x,x)+97B3p
.text:7C809842                                         ; CreateActCtxW(x)+15C8Dp ...
.text:7C809842
.text:7C809842 Destination     = dword ptr  4
.text:7C809842 Exchange        = dword ptr  8
.text:7C809842 Comperand       = dword ptr  0Ch
.text:7C809842
.text:7C809842                 mov     ecx, [esp+Destination]
.text:7C809846                 mov     edx, [esp+Exchange]
.text:7C80984A                 mov     eax, [esp+Comperand]
.text:7C80984E
.text:7C80984E loc_7C80984E:                           ; DATA XREF: .data:7C885014o
.text:7C80984E                 lock cmpxchg [ecx], edx
.text:7C809852                 retn    0Ch
.text:7C809852 _InterlockedCompareExchange@12 endp
.text:7C809852
.text:7C809852 ; ---------------------------------------------------------------------------
.text:7C809855                 align 2
.text:7C809856 ; Exported entry 543. InterlockedExchangeAdd
.text:7C809856
.text:7C809856 ; =============== S U B R O U T I N E =======================================
.text:7C809856
.text:7C809856
.text:7C809856 ; LONG __stdcall InterlockedExchangeAdd(volatile LONG *Addend, LONG Value)
.text:7C809856                 public _InterlockedExchangeAdd@8
.text:7C809856 _InterlockedExchangeAdd@8 proc near     ; DATA XREF: .text:off_7C802654o
.text:7C809856
.text:7C809856 Addend          = dword ptr  4
.text:7C809856 Value           = dword ptr  8
.text:7C809856
.text:7C809856                 mov     ecx, [esp+Addend]
.text:7C80985A                 mov     eax, [esp+Value]
.text:7C80985E
.text:7C80985E loc_7C80985E:                           ; DATA XREF: .data:7C885018o
.text:7C80985E                 lock xadd [ecx], eax
.text:7C809862                 retn    8
.text:7C809862 _InterlockedExchangeAdd@8 endp
.text:7C809862
.text:7C809862 ; -------------------------------------------------------------------

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值