sharing mutex, rwlock, barrier and condition variable among processes