4 |
|
|
5 |
optimization: |
optimization: |
6 |
------------- |
------------- |
|
|
|
7 |
Compiling with -O0 is not supported. It may or may not work; please |
Compiling with -O0 is not supported. It may or may not work; please |
8 |
use -O1 if you want to do maximize debuggability. |
use -O1 if you want to do maximize debuggability. |
9 |
|
|
12 |
|
|
13 |
setjmp()/longjmp(): |
setjmp()/longjmp(): |
14 |
------------------- |
------------------- |
|
|
|
15 |
setjmp() and longjmp() *do not* save signal state. sigsetjmp() and |
setjmp() and longjmp() *do not* save signal state. sigsetjmp() and |
16 |
siglongjmp() *do* save the signal mask -- regardless of the value of |
siglongjmp() *do* save the signal mask -- regardless of the value of |
17 |
the extra argument. |
the extra argument. |
25 |
|
|
26 |
stdio: |
stdio: |
27 |
------ |
------ |
|
|
|
28 |
Only a small subset of the stdio functions are implemented. Those |
Only a small subset of the stdio functions are implemented. Those |
29 |
that are implemented do not buffer, although they *do* trap EINTR or |
that are implemented do not buffer, although they *do* trap EINTR or |
30 |
short read/writes and iterate. |
short read/writes and iterate. |
35 |
|
|
36 |
namespaces: |
namespaces: |
37 |
----------- |
----------- |
|
|
|
38 |
klibc frequently includes headers in other headers in a way that |
klibc frequently includes headers in other headers in a way that |
39 |
exposes more symbols than POSIX says they should. "Live with it." |
exposes more symbols than POSIX says they should. "Live with it." |
40 |
|
|
41 |
|
|
42 |
theading: |
theading: |
43 |
--------- |
--------- |
|
|
|
44 |
klibc is not thread-safe. Consequently, clone() or any of the |
klibc is not thread-safe. Consequently, clone() or any of the |
45 |
pthreads functions are not included. |
pthreads functions are not included. |
46 |
|
|
47 |
|
|
48 |
bsd_signal vs sysv_signal: |
bsd_signal vs sysv_signal: |
49 |
-------------------------- |
-------------------------- |
50 |
|
signal() now defaults to bsd_signal(). |
|
There is no signal() call, because you never know if you want |
|
|
Linux/SysV semantics (SA_RESETHAND) or GNU/BSD semantics (SA_RESTART). |
|
|
The best, in *any* circumstances, is to never use signal() and instead |
|
|
use sigaction(), but in order to simplify porting you can use either |
|
|
sysv_signal() or bsd_signal(), depending on what you actually want. |
|