Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst

Issue 940503003: NaCl docs: mention static libraries for SJLJ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: HTML. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « native_client_sdk/doc_generated/reference/pnacl-c-cpp-language-support.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: 173 .. _exception_handling:
174 174
175 C++ Exception Handling 175 C++ Exception Handling
176 ====================== 176 ======================
177 177
178 PNaCl currently supports C++ exception handling through ``setjmp()`` and 178 PNaCl currently supports C++ exception handling through ``setjmp()`` and
179 ``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` 179 ``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` linker
180 linker flag. Exceptions are disabled by default so that faster and 180 flag (set with ``LDFLAGS`` when using Make). Exceptions are disabled by default
Sam Clegg 2015/02/19 18:37:47 Is it a linker flag? I assumed it was a compiler
JF 2015/02/19 19:15:45 That's entirely true! Docs updated, thanks for cat
181 smaller code is generated, and ``throw`` statements are replaced with 181 so that faster and smaller code is generated, and ``throw`` statements are
182 calls to ``abort()``. The usual ``-fno-exceptions`` flag is also 182 replaced with calls to ``abort()``. The usual ``-fno-exceptions`` flag is also
183 supported. PNaCl will support full zero-cost exception handling in the 183 supported, though the default is ``-fexceptions``. PNaCl will support full
184 future. 184 zero-cost exception handling in the future.
185
186 .. note:: When using naclports_ or other prebuilt static libraries, you'll want
187 to make sure these libraries are built with the same configuration
188 your library is built with. If you want to use exception handling,
189 then you'll need to rebuild these libraries with exception handling
190 enabled. For naclports, you'll want to modify the port's ``build.sh``.
191
192 .. _naclports: https://code.google.com/p/naclports
185 193
186 NaCl supports full zero-cost C++ exception handling. 194 NaCl supports full zero-cost C++ exception handling.
187 195
188 Inline Assembly 196 Inline Assembly
189 =============== 197 ===============
190 198
191 Inline assembly isn't supported by PNaCl because it isn't portable. The 199 Inline assembly isn't supported by PNaCl because it isn't portable. The
192 one current exception is the common compiler barrier idiom 200 one current exception is the common compiler barrier idiom
193 ``asm("":::"memory")``, which gets transformed to a sequentially 201 ``asm("":::"memory")``, which gets transformed to a sequentially
194 consistent memory barrier (equivalent to ``__sync_synchronize()``). In 202 consistent memory barrier (equivalent to ``__sync_synchronize()``). In
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 A similar feature is **thread suspension**: The ability to 477 A similar feature is **thread suspension**: The ability to
470 asynchronously suspend and resume a thread and inspect or modify its 478 asynchronously suspend and resume a thread and inspect or modify its
471 execution state (such as register state). 479 execution state (such as register state).
472 480
473 Neither PNaCl nor NaCl currently support asynchronous interruption 481 Neither PNaCl nor NaCl currently support asynchronous interruption
474 or suspension of threads. 482 or suspension of threads.
475 483
476 If PNaCl were to support either of these, the interaction of 484 If PNaCl were to support either of these, the interaction of
477 ``volatile`` and atomics with same-thread signal handling would need 485 ``volatile`` and atomics with same-thread signal handling would need
478 to be carefully detailed. 486 to be carefully detailed.
OLDNEW
« no previous file with comments | « native_client_sdk/doc_generated/reference/pnacl-c-cpp-language-support.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698