… | |
… | |
82 | below don't even feature a working sigaltstack. You cannot use this |
82 | below don't even feature a working sigaltstack. You cannot use this |
83 | implementation if some other code uses SIGUSR2 or you plan to |
83 | implementation if some other code uses SIGUSR2 or you plan to |
84 | create coroutines from an alternative signal stack, as both are being |
84 | create coroutines from an alternative signal stack, as both are being |
85 | used for coroutine creation. |
85 | used for coroutine creation. |
86 | |
86 | |
87 | a Handcoded assembly. This is the fastest method with the least side |
87 | a Handcoded assembly. This is the fastest and most compatible method |
88 | effects, if it works, that is. It has been tested on GNU/Linux x86 and |
88 | with the least side effects, if it works, that is. It has been tested |
89 | x86_64 systems and should work on all x86/x86_64 systems using the SVR |
89 | on GNU/Linux x86 and x86_64 systems and should work on all x86/x86_64 |
90 | ELF ABI. This is the recommended method on supported platforms. |
90 | systems using the SVR ELF ABI. This is the recommended method on |
|
|
91 | supported platforms. Note that you usually have to compile this module |
|
|
92 | with optimisation enabled for this method to work, and also more |
|
|
93 | esoteric switches such as -fomit-leaf-frame-pointer might be required. |
|
|
94 | When i doubt, use another method, such as (s)etjmp/longjmp. |
91 | |
95 | |
92 | l GNU/Linux. Very old GNU/Linux systems (glibc-2.1 and below) need |
96 | l GNU/Linux. Very old GNU/Linux systems (glibc-2.1 and below) need |
93 | this hack. Since it is very linux-specific it is also quite fast and |
97 | this hack. Since it is very linux-specific it is also quite fast and |
94 | recommended even for newer versions; when it works, that is (currently |
98 | recommended even for newer versions; when it works, that is (currently |
95 | x86 and a few others only. If it compiles, it's usually ok). Newer |
99 | x86 and a few others only. If it compiles, it's usually ok). Newer |
… | |
… | |
102 | w Microsoft Windows. Try this on Microsoft Windows, although, as there is |
106 | w Microsoft Windows. Try this on Microsoft Windows, although, as there is |
103 | no standard on how to do this under windows, this might work only on |
107 | no standard on how to do this under windows, this might work only on |
104 | cygwin or specific versions of msvc. Your problem, your fix, our patch. |
108 | cygwin or specific versions of msvc. Your problem, your fix, our patch. |
105 | |
109 | |
106 | For most systems, the default chosen should be OK. If you experience |
110 | For most systems, the default chosen should be OK. If you experience |
107 | problems then you should experiment with this setting and/or turn off |
111 | problems then you should experiment with this setting and/or turn |
108 | optimizations (make OPTIMIZE=-O0). |
112 | optimisations on or off (make OPTIMIZE=-O0). |
109 | |
113 | |
110 | EOF |
114 | EOF |
111 | |
115 | |
112 | retry: |
116 | retry: |
113 | |
117 | |