0
0
mirror of https://gitlab.com/cznic/sqlite.git synced 2025-05-17 23:26:41 +00:00

7 Commits

Author SHA1 Message Date
129378c6d1 Fix a data race in lib/mutex.go
Closes .
2023-06-02 14:29:30 +04:00
c0ed312986 lib: allocate static mutexes from the pool
This further simplifies the code.
It also removes a branch from the mutex lookup code,
at the code of adding bounds checks to the static mutex lookups.
2023-01-04 18:30:44 -08:00
c718117e97 lib: use less unsafe for mutexes
We can concoct any scheme we like for mapping
between uintptrs and mutexes.

Instead of using unsafe to map between actual pointers and uintptrs,
use a simple numbering scheme. Zero means nil. The next 12 ints
correspond to sqlite's 12 built-in mutexes. Everything after that
is an index into the mutex pool, appropriately shifted by 12.

This makes vet happy and makes the pointer checker happy.

It adds instructions and branches to the mutex acquisition path,
which is definitely unfortunate. In exchange, though,
we get simplicity, safety, and easy to reason about mutex "pointers".
2023-01-04 18:26:21 -08:00
343988cb93 upgrade to SQLite 3.40.1 2022-12-28 23:26:14 +01:00
d4ed92c0a7 regenerate all but windows, updates 2021-11-25 16:13:25 +01:00
c07fc560c9 libtest: configure mutexes 2021-11-04 21:11:26 +01:00
5a2af3f4dc Set up mutex on lib package initialization
Fixes 
2021-04-21 20:56:35 -07:00