Hello,

I'm using Emscripten with "-s USE_PTHREADS=1 -s PROXY_TO_PTHREAD=1 
-s PROXY_POSIX_SOCKETS=1 -pthread -g4" compile/ link options to compile two 
different object files which are then linked together in the end with same 
options.

However, I'm finding that in object 2, if I use pthread_mutex_* APIs the 
second call fails with EINVAL, also sem_*() APIs too fail with same EINVAL. 
However, if I allocate ,initialize and return a pointer to pthread_mutex_t 
variable after initialization in object 1, it works perfectly fine. Lock/ 
unlock also works fine with pointer passing from object 2 -> 1. But still, 
the later pthread_cond_wait() calls fail again with EINVAL.

Am I missing any compiler/ linker flags here? I can reproduce the issue in 
both Win 10 & Ubuntu 20.04 Chrome as well as Linux Firefox.

Thanks,
Sarang.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/eafcaaf3-2745-41f2-a3b2-793a6e27ff89n%40googlegroups.com.

Reply via email to