No description
Find a file
Nick Pelly 260f48a917 Helper to perform abortable blocking operations on a socket:
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.
2009-05-29 16:10:16 -07:00
adb auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:37 -07:00
cpio auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
debuggerd auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
fastboot auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:49 -07:00
include Helper to perform abortable blocking operations on a socket: 2009-05-29 16:10:16 -07:00
init Merge commit 'remotes/korg/cupcake' into merge 2009-03-18 09:29:29 -07:00
libctest auto import from //branches/cupcake_rel/...@141571 2009-03-19 23:09:00 -07:00
libcutils Helper to perform abortable blocking operations on a socket: 2009-05-29 16:10:16 -07:00
liblog Merge commit 'korg/cupcake' 2009-03-27 15:31:14 -07:00
libmincrypt auto import from //branches/cupcake_rel/...@141571 2009-03-19 23:09:00 -07:00
libnetutils auto import from //branches/cupcake_rel/...@141571 2009-03-19 23:09:00 -07:00
libpixelflinger Merge commit 'remotes/korg/cupcake' into merge 2009-03-18 09:29:29 -07:00
libzipfile auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
logcat auto import from //branches/cupcake/...@137197 2009-03-09 11:52:15 -07:00
logwrapper auto import from //branches/cupcake_rel/...@141571 2009-03-19 23:09:00 -07:00
mkbootimg auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
mountd auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
netcfg auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rootdir Automated import from //branches/cupcake/...@142808,142808 2009-03-25 17:02:32 -07:00
sh auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
toolbox Merge commit 'remotes/korg/cupcake' into merge 2009-03-18 09:29:29 -07:00
vold auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:49 -07:00
Android.mk auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
README auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00

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