aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2020-03-30 13:35:05 +0000
committerdan <dan@noemail.net>2020-03-30 13:35:05 +0000
commit892edb69c4f1071b682d88d13be45f7faa980f63 (patch)
tree8bceda36b2f53eb1fa1501a296a04cd6566bb403 /src/malloc.c
parent3e42b9917566acdc67a04b08dbf8fc3227fc785d (diff)
downloadsqlite-892edb69c4f1071b682d88d13be45f7faa980f63.tar.gz
sqlite-892edb69c4f1071b682d88d13be45f7faa980f63.zip
Use __atomic_load_n() and __atomic_store_n() for a few more things where they are available.
FossilOrigin-Name: a49f8ec552bede7da731e0571ccf49de1a30e7be3a5673150436c8b411ba6ffc
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 9dd400a3b..a19d8bdfb 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -760,7 +760,7 @@ void sqlite3OomFault(sqlite3 *db){
if( db->mallocFailed==0 && db->bBenignMalloc==0 ){
db->mallocFailed = 1;
if( db->nVdbeExec>0 ){
- db->u1.isInterrupted = 1;
+ AtomicStore(&db->u1.isInterrupted, 1);
}
DisableLookaside;
if( db->pParse ){
@@ -779,7 +779,7 @@ void sqlite3OomFault(sqlite3 *db){
void sqlite3OomClear(sqlite3 *db){
if( db->mallocFailed && db->nVdbeExec==0 ){
db->mallocFailed = 0;
- db->u1.isInterrupted = 0;
+ AtomicStore(&db->u1.isInterrupted, 0);
assert( db->lookaside.bDisable>0 );
EnableLookaside;
}