1. Binder - 不支持Native层的binder
  2. 内存共享 - 不支持
  3. 信号量(信号灯) - 不支持
  4. 消息队列 - 不支持
  5. 信号 - 支持,但是不能用sigqueue传消息,只能用来安装信号,可以用来收集Native Crash日志
  6. 管道 - 匿名管道,支持
  7. 管道 - FIFO,支持
  8. socket - 支持

[参考资料] 为何binder在native不受支持 https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/1QmVRrNckfM

为何不支持内存共享、消息队列、信号量 ,参见https://android.googlesource.com/platform/ndk/+/4e159d95ebf23b5f72bb707b0cb1518ef96b3d03/docs/system/libc/SYSV-IPC.TXT

https://groups.google.com/forum/#!topic/android-ndk/FzJIsJIxCX4

http://stackoverflow.com/questions/18603267/cross-process-locking-with-android-ndk

Android源代码中的文档说明:http://www.netmite.com/android/mydroid/1.6/bionic/libc/docs/SYSV-IPC.TXT

(该文件在Android4。3中似乎已经移出该文档)

Android does not support System V IPCs, i.e. the facilities provided by the
following standard Posix headers: <sys/sem.h> /* SysV semaphores */
<sys/shm.h> /* SysV shared memory segments */
<sys/msg.h> /* SysV message queues */
<sys/ipc.h> /* General IPC definitions */ The reason for this is due to the fact that, by design, they lead to global
kernel resource leakage.

原因就是防止内核资源泄露。

另外:fork()也尽量不要用。

道理很简单:我们不应该控制android的底层,这些api会造成系统的不稳定。

https://groups.google.com/forum/#!msg/android-platform/80jr-_A-9bU/nkzslcgVrfYJ

“Bear in mind that the Dalvik VM doesn't like fork() much, and goes into conniptions if you try to do *any* work between the fork() and the exec(). ”

https://groups.google.com/forum/#!topic/android-ndk/FzJIsJIxCX4

最新文章

  1. Effective前端3:用CSS画一个三角形
  2. 用python实现的百度音乐下载器-python-pyqt-改进版
  3. haproxy学习之https配置
  4. 搭建Python+Django开发环境
  5. 佛洛依德 c++ 最短路径算法
  6. bzoj2286 消耗战
  7. 微信公众号开发中遇到的几个bug
  8. python decorator simple example
  9. 暴力+降复杂度 BestCoder Round #39 1002 Mutiple
  10. Scala Tail Recursion (尾递归)
  11. Mac下的SVN客户端工具Cornerstone使用教程
  12. js遇到这样基础题,看你能不能作对呢
  13. printf 缓冲区问题
  14. SSD和HDD的区别
  15. A计划(bfs)
  16. USB OTG简要
  17. [CVPR2015] Is object localization for free? – Weakly-supervised learning with convolutional neural networks论文笔记
  18. 分布式监控系统开发【day38】:报警自动升级代码解析及测试(八)
  19. JSON Web Token 入门教程
  20. tensorflow c/c++库使用方法

热门文章

  1. Testcase的编写
  2. HDU 4691 Front compression (2013多校9 1006题 后缀数组)
  3. 分享我用Taker做任务时需要的各种资源的精华帖,方便查阅
  4. Go语言设计模式实践:组合(Composite)
  5. 个人对AutoResetEvent和ManualResetEvent的理解
  6. windows样式(style)参考
  7. 提交svn的时候,提示丢失了预定增加的xxxx
  8. QT 5.3 VS2010 中文
  9. jenkins错误413 Request Entity Too Large&lt;
  10. HDU 4649 - Professor Tian(2013MUTC5-1007)(概率)