musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 3c5c5e6f92 optimize posix_spawn to avoid spurious sigaction syscalls
the trick here is that sigaction can track for us which signals have
ever had a signal handler set for them, and only those signals need to
be considered for reset. this tracking mask may have false positives,
since it is impossible to remove bits from it without race conditions.
false negatives are not possible since the mask is updated with atomic
operations prior to making the sigaction syscall.

implementation-internal signals are set to SIG_IGN rather than SIG_DFL
so that a signal raised in the parent (e.g. calling pthread_cancel on
the thread executing pthread_spawn) does not have any chance make it
to the child, where it would cause spurious termination by signal.

this change reduces the minimum/typical number of syscalls in the
child from around 70 to 4 (including execve). this should greatly
improve the performance of posix_spawn and other interfaces which use
it (popen and system).

to facilitate these changes, sigismember is also changed to return 0
rather than -1 for invalid signals, and to return the actual status of
implementation-internal signals. POSIX allows but does not require an
error on invalid signal numbers, and in fact returning an error tends
to confuse applications which wrongly assume the return value of
sigismember is boolean.
2013-08-09 21:03:47 -04:00
arch fix powerpc build breakage from dynamic linker path search changes 2013-07-26 03:10:11 -04:00
crt new mostly-C crt1 implementation 2013-07-26 01:49:14 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include sys/personality.h: add missing C++ compat 2013-08-08 20:57:35 +02:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src optimize posix_spawn to avoid spurious sigaction syscalls 2013-08-09 21:03:47 -04:00
tools refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
.gitignore new gcc wrapper, entirely specfile based 2012-04-22 14:32:49 -04:00
COPYRIGHT mention bits headers in another part of copyright file 2013-04-20 14:03:12 -04:00
INSTALL update readme and release notes for 0.9.8 2012-11-26 21:01:30 -05:00
Makefile work around gcc 4.8's generation of self-referential mem* functions at -O3 2013-08-01 17:12:23 -04:00
README update documentation 2012-10-26 20:14:19 -04:00
WHATSNEW release notes for 0.9.12 2013-07-29 03:20:08 -04:00
configure protect against long double type mismatches (mainly powerpc for now) 2013-08-02 19:34:22 -04:00

README

musl libc - a new standard library to power a new generation of
Linux-based devices. musl is lightweight, fast, simple, free, and
strives to be correct in the sense of standards-conformance and
safety.

musl is an alternative to glibc, eglibc, uClibc, dietlibc, and klibc.
For reasons why one might prefer musl, please see the FAQ and libc
comparison chart on the project website,

    http://www.musl-libc.org/

For installation instructions, see the INSTALL file.

Please refer to the COPYRIGHT file for details on the copyright and
license status of code included in musl (standard MIT license).



Greetings!

The 0.9.x release series for musl features interface coverage for all
interfaces defined in ISO C99 and POSIX 2008 base, along with a number
of non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality. As the release series progresses, we are
gradually adding support for incomplete functionality in existing
interfaces, additional functions that are deemed to be important due
to their use in real-world software, and support for new library and
language features in C11 such as thread-local storage, which is now
supported on all targets. In addition, support for additional target
cpu architectures is being added.

The number of packages build successfully against musl - either
out-of-the-box or with minor patches to address portability errors -
has exceeded 5000 and is steadily growing. In addition to application
compatibility testing, unit testing has been conducted using three
separate test frameworks and numerous additional standalone test cases
to verify the correctness of the implementation.

Included with this package is a gcc wrapper script (musl-gcc) which
allows you to build musl-linked programs using an existing gcc 3.x or
4.x toolchain on the host. There are also now at several mini
distributions (in the form of build scripts) which provide a
self-hosting musl-based toolchain and system root. These are much
better options than the wrapper script if you wish to use dynamic
linking or build packages with many library dependencies. See the musl
website for details.

The musl project is actively seeking contributors, mostly in the areas
of porting, testing, and application compatibility improvement. For
bug reports, support requests, or to get involved in development,
please visit #musl on Freenode IRC or subscribe to the musl mailing
list by sending a blank email to musl-subscribe AT lists DOT openwall
DOT com.

Thank you for using musl.

Cheers,

Rich Felker / dalias