Commit 3b9e9dd0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp110: Add _Lock_shared_ptr_spin_lock implementation.

parent a33f4646
......@@ -3815,7 +3815,7 @@
@ stub _LXp_sqrtx
@ stub _LXp_subx
@ extern _LZero
@ stub _Lock_shared_ptr_spin_lock
@ cdecl _Lock_shared_ptr_spin_lock()
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
@ stub _Mtx_clear_owner
@ cdecl _Mtx_current_owns(ptr)
......@@ -3874,7 +3874,7 @@
@ stub _Tss_delete
@ stub _Tss_get
@ stub _Tss_set
@ stub _Unlock_shared_ptr_spin_lock
@ cdecl _Unlock_shared_ptr_spin_lock()
@ cdecl _Wcrtomb(ptr long ptr ptr)
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
@ stub _Wcsxfrm
......
......@@ -3760,7 +3760,7 @@
@ stub _LXp_sqrtx
@ stub _LXp_subx
@ extern _LZero
@ stub _Lock_shared_ptr_spin_lock
@ cdecl _Lock_shared_ptr_spin_lock()
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
@ stub _Mtx_clear_owner
@ cdecl _Mtx_current_owns(ptr)
......@@ -3821,7 +3821,7 @@
@ stub _Tss_delete
@ stub _Tss_get
@ stub _Tss_set
@ stub _Unlock_shared_ptr_spin_lock
@ cdecl _Unlock_shared_ptr_spin_lock()
@ cdecl _Wcrtomb(ptr long ptr ptr)
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
@ stub _Wcsxfrm
......
......@@ -3760,7 +3760,7 @@
@ stub _LXp_sqrtx
@ stub _LXp_subx
@ 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
@ stub _Mtx_clear_owner
@ cdecl _Mtx_current_owns(ptr) msvcp120._Mtx_current_owns
......@@ -3821,7 +3821,7 @@
@ stub _Tss_delete
@ stub _Tss_get
@ 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 _Wcscoll(ptr ptr ptr ptr ptr) msvcp120._Wcscoll
@ stub _Wcsxfrm
......
......@@ -3668,7 +3668,7 @@
@ extern _LSnan _LSnan
@ stub _Last_write_time
@ stub _Link
@ stub _Lock_shared_ptr_spin_lock
@ cdecl _Lock_shared_ptr_spin_lock()
@ stub _Lstat
@ stub _Make_dir
@ cdecl _Mbrtowc(ptr ptr long ptr ptr) _Mbrtowc
......@@ -3738,7 +3738,7 @@
@ cdecl _Towlower(long ptr) _Towlower
@ cdecl _Towupper(long ptr) _Towupper
@ stub _Unlink
@ stub _Unlock_shared_ptr_spin_lock
@ cdecl _Unlock_shared_ptr_spin_lock()
@ stub _WStod
@ stub _WStodx
@ stub _WStof
......
......@@ -1339,3 +1339,24 @@ void __cdecl threads__Mtx_unlock(void *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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment