IPC through mutexes in shared memory

53 views
Skip to first unread message

Rolle

unread,
May 30, 2015, 7:47:19 AM5/30/15
to andro...@googlegroups.com
Hi,
I want to achieve very performant IPC. In my case I have a tree structure of data, and my intention is to put this tree in shared memory using ashmem. However, to control access, I have heard concerns about using mutexes in shared memory. Does anyone know if this is a safe solution for access control? The only pthread mutex attribute that exists seems to be PTHREAD_PROCESS_PRIVATE.

Glenn Kasten

unread,
Jun 1, 2015, 10:19:22 AM6/1/15
to andro...@googlegroups.com, roland.w...@gmail.com
See http://man7.org/linux/man-pages/man2/futex.2.html
There might not be a syscall wrapper built in to NDK library, 
but you could write the syscall wrapper yourself.

jeff shanab

unread,
Jun 1, 2015, 10:32:05 AM6/1/15
to andro...@googlegroups.com
boost has abstractions for this kind of thing and boost works on android....maybe

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages