OLD | NEW |
1 ============================ | 1 ============================ |
2 PNaCl C/C++ Language Support | 2 PNaCl C/C++ Language Support |
3 ============================ | 3 ============================ |
4 | 4 |
5 .. contents:: | 5 .. contents:: |
6 :local: | 6 :local: |
7 :backlinks: none | 7 :backlinks: none |
8 :depth: 3 | 8 :depth: 3 |
9 | 9 |
10 Source language support | 10 Source language support |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 Communication between threads should use atomic primitives as described | 164 Communication between threads should use atomic primitives as described |
165 in `Memory Model and Atomics`_. | 165 in `Memory Model and Atomics`_. |
166 | 166 |
167 ``setjmp`` and ``longjmp`` | 167 ``setjmp`` and ``longjmp`` |
168 ========================== | 168 ========================== |
169 | 169 |
170 PNaCl and NaCl support ``setjmp`` and ``longjmp`` without any | 170 PNaCl and NaCl support ``setjmp`` and ``longjmp`` without any |
171 restrictions beyond C's. | 171 restrictions beyond C's. |
172 | 172 |
| 173 .. _exception_handling: |
| 174 |
173 C++ Exception Handling | 175 C++ Exception Handling |
174 ====================== | 176 ====================== |
175 | 177 |
176 PNaCl currently supports C++ exception handling through ``setjmp()`` and | 178 PNaCl currently supports C++ exception handling through ``setjmp()`` and |
177 ``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` | 179 ``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` |
178 linker flag. Exceptions are disabled by default so that faster and | 180 linker flag. Exceptions are disabled by default so that faster and |
179 smaller code is generated, and ``throw`` statements are replaced with | 181 smaller code is generated, and ``throw`` statements are replaced with |
180 calls to ``abort()``. The usual ``-fno-exceptions`` flag is also | 182 calls to ``abort()``. The usual ``-fno-exceptions`` flag is also |
181 supported. PNaCl will support full zero-cost exception handling in the | 183 supported. PNaCl will support full zero-cost exception handling in the |
182 future. | 184 future. |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 A similar feature is **thread suspension**: The ability to | 454 A similar feature is **thread suspension**: The ability to |
453 asynchronously suspend and resume a thread and inspect or modify its | 455 asynchronously suspend and resume a thread and inspect or modify its |
454 execution state (such as register state). | 456 execution state (such as register state). |
455 | 457 |
456 Neither PNaCl nor NaCl currently support asynchronous interruption | 458 Neither PNaCl nor NaCl currently support asynchronous interruption |
457 or suspension of threads. | 459 or suspension of threads. |
458 | 460 |
459 If PNaCl were to support either of these, the interaction of | 461 If PNaCl were to support either of these, the interaction of |
460 ``volatile`` and atomics with same-thread signal handling would need | 462 ``volatile`` and atomics with same-thread signal handling would need |
461 to be carefully detailed. | 463 to be carefully detailed. |
OLD | NEW |