No description
asocket_connect() asocket_accept() asocket_read() asocket_write() These calls are similar to the regular syscalls, but can be aborted with: asocket_abort() Calling close() on a regular POSIX socket does not abort blocked syscalls on that socket in other threads. After calling asocket_abort() the socket cannot be reused. Call asocket_destory() *after* all threads have finished with the socket to finish closing the socket and free the asocket structure. The helper is implemented by setting the socket non-blocking to initiate syscalls connect(), accept(), read(), write(), then using a blocking poll() on both the primary socket and a local pipe. This makes the poll() abortable by writing a byte to the local pipe in asocket_abort(). asocket_create() sets the fd to non-blocking mode. It must not be changed to blocking mode. Using asocket will triple the number of file descriptors required per socket, due to the local pipe. It may be possible to use a global pipe per process rather than per socket, but we have not been able to come up with a race-free implementation yet. All functions except asocket_init() and asocket_destroy() are thread safe. |
||
|---|---|---|
| adb | ||
| cpio | ||
| debuggerd | ||
| fastboot | ||
| include | ||
| init | ||
| libctest | ||
| libcutils | ||
| liblog | ||
| libmincrypt | ||
| libnetutils | ||
| libpixelflinger | ||
| libzipfile | ||
| logcat | ||
| logwrapper | ||
| mkbootimg | ||
| mountd | ||
| netcfg | ||
| rootdir | ||
| sh | ||
| toolbox | ||
| vold | ||
| Android.mk | ||
| README | ||
The system/ directory is intended for pieces of the world that are the core of the embedded linux platform at the heart of Android. These essential bits are required for basic booting, operation, and debugging. They should not depend on libraries outside of system/... (some of them do currently -- they need to be updated or changed) and they should not be required for the simulator build. The license for all these pieces should be clean (Apache2, BSD, or MIT). Currently system/bluetooth/... and system/extra/... have some pieces with GPL/LGPL licensed code. Assorted Issues: - pppd depends on libutils for logging - pppd depends on libcrypt/libcrypto - init, linker, debuggerd, toolbox, usbd depend on libcutils - should probably rename bionic to libc