Race on sqlite3_open_v2/sqlite3_initialize on darwin/amd64
I received [a report on `zombiezen.com/go/sqlite`](https://github.com/zombiezen/go-sqlite/issues/18) of a data race when opening multiple connections to `:memory:` with shared-cache mode. The race is inside `modernc.org/sqlite/lib.Xsqlite3_initialize` inside a critical region protected by a call to `Xsqlite3_mutex_enter`. I'm not able to reproduce the issue on linux/amd64, and based on stack trace, Peter is running on darwin/amd64. I believe the root issue is that [pthreads are only used on `linux/amd64`](https://gitlab.com/cznic/sqlite/-/blob/d5a408ea46bdb01b9ba331eaf920199512868030/lib/mutex.go#L30).
I couldn't find another issue tracking implementing mutex support on more than linux/amd64, so I'm opening this ticket.
issue