1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add new memory barriers during initialization.

FossilOrigin-Name: a9b2adc5d61790abd86839d12e7ecb98a85d7e4cde5f94558530e32449d9e483
This commit is contained in:
drh
2020-01-29 13:10:50 +00:00
parent 9ca9a53a42
commit ffd3fd0c30
5 changed files with 16 additions and 11 deletions

View File

@@ -161,7 +161,10 @@ int sqlite3_initialize(void){
** must be complete. So isInit must not be set until the very end
** of this routine.
*/
if( sqlite3GlobalConfig.isInit ) return SQLITE_OK;
if( sqlite3GlobalConfig.isInit ){
sqlite3MemoryBarrier();
return SQLITE_OK;
}
/* Make sure the mutex subsystem is initialized. If unable to
** initialize the mutex subsystem, return early with the error.