msvcp110: Add _Lock_shared_ptr_spin_lock implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a33f4646cd
commit
3b9e9dd06a
|
@ -3815,7 +3815,7 @@
|
||||||
@ stub _LXp_sqrtx
|
@ stub _LXp_sqrtx
|
||||||
@ stub _LXp_subx
|
@ stub _LXp_subx
|
||||||
@ extern _LZero
|
@ extern _LZero
|
||||||
@ stub _Lock_shared_ptr_spin_lock
|
@ cdecl _Lock_shared_ptr_spin_lock()
|
||||||
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
|
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
|
||||||
@ stub _Mtx_clear_owner
|
@ stub _Mtx_clear_owner
|
||||||
@ cdecl _Mtx_current_owns(ptr)
|
@ cdecl _Mtx_current_owns(ptr)
|
||||||
|
@ -3874,7 +3874,7 @@
|
||||||
@ stub _Tss_delete
|
@ stub _Tss_delete
|
||||||
@ stub _Tss_get
|
@ stub _Tss_get
|
||||||
@ stub _Tss_set
|
@ stub _Tss_set
|
||||||
@ stub _Unlock_shared_ptr_spin_lock
|
@ cdecl _Unlock_shared_ptr_spin_lock()
|
||||||
@ cdecl _Wcrtomb(ptr long ptr ptr)
|
@ cdecl _Wcrtomb(ptr long ptr ptr)
|
||||||
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
|
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
|
||||||
@ stub _Wcsxfrm
|
@ stub _Wcsxfrm
|
||||||
|
|
|
@ -3760,7 +3760,7 @@
|
||||||
@ stub _LXp_sqrtx
|
@ stub _LXp_sqrtx
|
||||||
@ stub _LXp_subx
|
@ stub _LXp_subx
|
||||||
@ extern _LZero
|
@ extern _LZero
|
||||||
@ stub _Lock_shared_ptr_spin_lock
|
@ cdecl _Lock_shared_ptr_spin_lock()
|
||||||
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
|
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
|
||||||
@ stub _Mtx_clear_owner
|
@ stub _Mtx_clear_owner
|
||||||
@ cdecl _Mtx_current_owns(ptr)
|
@ cdecl _Mtx_current_owns(ptr)
|
||||||
|
@ -3821,7 +3821,7 @@
|
||||||
@ stub _Tss_delete
|
@ stub _Tss_delete
|
||||||
@ stub _Tss_get
|
@ stub _Tss_get
|
||||||
@ stub _Tss_set
|
@ stub _Tss_set
|
||||||
@ stub _Unlock_shared_ptr_spin_lock
|
@ cdecl _Unlock_shared_ptr_spin_lock()
|
||||||
@ cdecl _Wcrtomb(ptr long ptr ptr)
|
@ cdecl _Wcrtomb(ptr long ptr ptr)
|
||||||
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
|
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
|
||||||
@ stub _Wcsxfrm
|
@ stub _Wcsxfrm
|
||||||
|
|
|
@ -3760,7 +3760,7 @@
|
||||||
@ stub _LXp_sqrtx
|
@ stub _LXp_sqrtx
|
||||||
@ stub _LXp_subx
|
@ stub _LXp_subx
|
||||||
@ extern _LZero msvcp120._LZero
|
@ extern _LZero msvcp120._LZero
|
||||||
@ stub _Lock_shared_ptr_spin_lock
|
@ cdecl _Lock_shared_ptr_spin_lock() msvcp120._Lock_shared_ptr_spin_lock
|
||||||
@ cdecl _Mbrtowc(ptr ptr long ptr ptr) msvcp120._Mbrtowc
|
@ cdecl _Mbrtowc(ptr ptr long ptr ptr) msvcp120._Mbrtowc
|
||||||
@ stub _Mtx_clear_owner
|
@ stub _Mtx_clear_owner
|
||||||
@ cdecl _Mtx_current_owns(ptr) msvcp120._Mtx_current_owns
|
@ cdecl _Mtx_current_owns(ptr) msvcp120._Mtx_current_owns
|
||||||
|
@ -3821,7 +3821,7 @@
|
||||||
@ stub _Tss_delete
|
@ stub _Tss_delete
|
||||||
@ stub _Tss_get
|
@ stub _Tss_get
|
||||||
@ stub _Tss_set
|
@ stub _Tss_set
|
||||||
@ stub _Unlock_shared_ptr_spin_lock
|
@ cdecl _Unlock_shared_ptr_spin_lock() msvcp120._Unlock_shared_ptr_spin_lock
|
||||||
@ cdecl _Wcrtomb(ptr long ptr ptr) msvcp120._Wcrtomb
|
@ cdecl _Wcrtomb(ptr long ptr ptr) msvcp120._Wcrtomb
|
||||||
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr) msvcp120._Wcscoll
|
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr) msvcp120._Wcscoll
|
||||||
@ stub _Wcsxfrm
|
@ stub _Wcsxfrm
|
||||||
|
|
|
@ -3668,7 +3668,7 @@
|
||||||
@ extern _LSnan _LSnan
|
@ extern _LSnan _LSnan
|
||||||
@ stub _Last_write_time
|
@ stub _Last_write_time
|
||||||
@ stub _Link
|
@ stub _Link
|
||||||
@ stub _Lock_shared_ptr_spin_lock
|
@ cdecl _Lock_shared_ptr_spin_lock()
|
||||||
@ stub _Lstat
|
@ stub _Lstat
|
||||||
@ stub _Make_dir
|
@ stub _Make_dir
|
||||||
@ cdecl _Mbrtowc(ptr ptr long ptr ptr) _Mbrtowc
|
@ cdecl _Mbrtowc(ptr ptr long ptr ptr) _Mbrtowc
|
||||||
|
@ -3738,7 +3738,7 @@
|
||||||
@ cdecl _Towlower(long ptr) _Towlower
|
@ cdecl _Towlower(long ptr) _Towlower
|
||||||
@ cdecl _Towupper(long ptr) _Towupper
|
@ cdecl _Towupper(long ptr) _Towupper
|
||||||
@ stub _Unlink
|
@ stub _Unlink
|
||||||
@ stub _Unlock_shared_ptr_spin_lock
|
@ cdecl _Unlock_shared_ptr_spin_lock()
|
||||||
@ stub _WStod
|
@ stub _WStod
|
||||||
@ stub _WStodx
|
@ stub _WStodx
|
||||||
@ stub _WStof
|
@ stub _WStof
|
||||||
|
|
|
@ -1339,3 +1339,24 @@ void __cdecl threads__Mtx_unlock(void *mtx)
|
||||||
{
|
{
|
||||||
LeaveCriticalSection(mtx);
|
LeaveCriticalSection(mtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if _MSVCP_VER >= 110
|
||||||
|
static LONG shared_ptr_lock;
|
||||||
|
|
||||||
|
void __cdecl _Lock_shared_ptr_spin_lock(void)
|
||||||
|
{
|
||||||
|
LONG l = 0;
|
||||||
|
|
||||||
|
while(InterlockedCompareExchange(&shared_ptr_lock, 1, 0) != 0) {
|
||||||
|
if(l++ == 1000) {
|
||||||
|
Sleep(0);
|
||||||
|
l = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void __cdecl _Unlock_shared_ptr_spin_lock(void)
|
||||||
|
{
|
||||||
|
shared_ptr_lock = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue