src/pEp_internal.h
branchsync
changeset 3739 523fb9710660
parent 3699 e2aa6fdbd20b
child 3740 248166aa4ab2
child 3749 aa25e3e32641
child 3772 f4d6efa63ee1
     1.1 --- a/src/pEp_internal.h	Mon May 20 14:49:40 2019 +0200
     1.2 +++ b/src/pEp_internal.h	Tue May 21 07:04:51 2019 +0200
     1.3 @@ -475,3 +475,15 @@
     1.4      _pEp_rand_max_bits = (int) ceil(log2((double) RAND_MAX));
     1.5      _pEp_log2_36 = log2(36);
     1.6  }
     1.7 +
     1.8 +// spinlock implementation
     1.9 +
    1.10 +static inline int Sqlite3_step(sqlite3_stmt* stmt)
    1.11 +{
    1.12 +    int rc;
    1.13 +    do {
    1.14 +        rc = sqlite3_step(stmt);
    1.15 +    } while (rc == SQLITE_BUSY || rc == SQLITE_LOCKED);
    1.16 +    return rc;
    1.17 +}
    1.18 +