src/pEp_internal.h
branchENGINE-524
changeset 3740 248166aa4ab2
parent 3735 25b31318dcdc
parent 3739 523fb9710660
child 3836 f7ec3ffc9487
     1.1 --- a/src/pEp_internal.h	Mon May 20 13:13:46 2019 +0200
     1.2 +++ b/src/pEp_internal.h	Thu May 23 13:27:34 2019 +0200
     1.3 @@ -482,3 +482,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 +