There is a native c++ application (linux) that load mono assembly. How to to share mutex (or his analogue) between managed and native parts of same application?
something like this:
native part:
native_lock_mutex(&db_mutex);
// do something with db
native_unlock_mutex(&db_mutex);
mono part:
managed_lock_mutex(db_mutex);
// do something with db
managed_unlock_mutex(db_mutex);