Does Android support process-shared mutexes and condition variables? I've heard bionic implementation doesn't support them because Android has other means of IPC, but cannot find information that would either confirm or deny it.
The sources are a bit confusing. In bionic's pthread_mutex.cpp just before pthread_mutexattr_setpshared there is a comment:
/* process-shared mutexes are not supported at the moment */
But inside the function there is also written:
/* our current implementation of pthread actually supports shared
* mutexes but won't cleanup if a process dies with the mutex held.
* Nevertheless, it's better than nothing. Shared mutexes are used
* by surfaceflinger and audioflinger.
*/
So has anybody used process-shared mutexes (and cond vars) in native android applications (by sharing them with ashmem_create_region, for example)?