1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

More changes required to compile for WinRT using VS 11 beta. Also, replace more APIs with their WinRT alternatives.

FossilOrigin-Name: 6b997d9c32076c480ff4f101ff93bae3f443e252
This commit is contained in:
mistachkin
2012-03-13 01:16:57 +00:00
parent 776f5c96f4
commit df562d5535
4 changed files with 140 additions and 67 deletions

View File

@@ -124,7 +124,11 @@ static int winMutexInit(void){
}else{
/* Someone else is in the process of initing the static mutexes */
while( !winMutex_isInit ){
#if SQLITE_OS_WINRT
Yield(); /* NOP */
#else
Sleep(1);
#endif
}
}
return SQLITE_OK;
@@ -198,7 +202,11 @@ static sqlite3_mutex *winMutexAlloc(int iType){
#ifdef SQLITE_DEBUG
p->id = iType;
#endif
#if SQLITE_OS_WINRT
InitializeCriticalSectionEx(&p->mutex, 0, 0);
#else
InitializeCriticalSection(&p->mutex);
#endif
}
break;
}