Android runs the Linux kernel, but moves many things around compared to a "normal" desktop Linux distro. In particular, note that Android includes pthread_*()functions within libc, not libpthread, t……
[/Quote]
果然是的,只不过支持不全,不需要引用-lpthread,pthread_cancel()确实没有。
你们这些文档是在哪里看的啊?我在android的source下的docs里面没有看到呀。
Android runs the Linux kernel, but moves many things around compared to a "normal" desktop Linux distro. In particular, note that Android includes pthread_*()functions within libc, not libpthread, thus the added configure check.
* include/private/gcconfig.h: Android platforms are built atop Linux,
don't use glibc, and uses `environ` instead of `__environ`.
* configure.in: Use AC_CHECK_LIB() to check for pthread instead of
just blindly linking to -lpthread, as Android includes pthread
support within libc and doesn't provide a separate libpthread