As of today in pure Wasm Worker build its simply not possible to call pthread functions.
In hybrid Wasm Workers + pthreads builds the APIs are available but we get undefined behaviour if pthread APIs are called from a Wasm Worker (since pthread_self() returns NULL).
Even in the pure Wasm Worker builds its problematic that we cannot use low level pthread APIs. For example we recently have to patch libc++ to avoid the pthread_mutex API. See #26345
We recently had some discussion of allowing pthread APIs in Wasm Workers, provided it can be done at zero cost for programs that don't use these APIs: #26568 (comment)