summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 22:47:29 +0000
committermseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 22:47:29 +0000
commit74912c8051d6a01fa6cdde6a1f48a8f008c35bb6 (patch)
tree8db0ecd440d56536fda504c89c35b4880da027f7
parent6e4021e46743ee305909aa2d9bc8082410cbd907 (diff)
downloadchromium_src-74912c8051d6a01fa6cdde6a1f48a8f008c35bb6.zip
chromium_src-74912c8051d6a01fa6cdde6a1f48a8f008c35bb6.tar.gz
chromium_src-74912c8051d6a01fa6cdde6a1f48a8f008c35bb6.tar.bz2
NaCl docs: Clarify signal handling and exception handling sections
"Exception handling" is ambiguous, so clarify C++ vs. hardware exceptions. "Signal handling" really refers to two features developers might want, to clarify that. BUG=none TEST="make" in native_client_sdk/src/doc Review URL: https://codereview.chromium.org/77153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236333 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst48
1 files changed, 34 insertions, 14 deletions
diff --git a/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst b/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst
index f9b98a7..51a55f0 100644
--- a/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst
+++ b/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst
@@ -195,25 +195,45 @@ operations which are lock-free on the current platform (``is_lock_free``
methods). It will rely on the address-free properly discussed in `Memory
Model for Concurrent Operations`_.
-Signal Handling
----------------
+POSIX-style Signal Handling
+---------------------------
+
+POSIX-style signal handling really consists of two different features:
+
+* **Hardware exception handling** (synchronous signals): The ability
+ to catch hardware exceptions (such as memory access faults and
+ division by zero) using a signal handler.
+
+ PNaCl currently doesn't support hardware exception handling.
+
+ NaCl supports hardware exception handling via the
+ ``<nacl/nacl_exception.h>`` interface.
+
+* **Asynchronous interruption of threads** (asynchronous signals): The
+ ability to asynchronously interrupt the execution of a thread,
+ forcing the thread to run a signal handler.
+
+ A similar feature is **thread suspension**: The ability to
+ asynchronously suspend and resume a thread and inspect or modify its
+ execution state (such as register state).
-Signal handling from user code currently isn't supported by PNaCl. When
-supported, the impact of ``volatile`` and atomics for same-thread signal
-handling will need to be carefully detailed.
+ Neither PNaCl nor NaCl currently support asynchronous interruption
+ or suspension of threads.
-NaCl supports signal handling.
+If PNaCl were to support either of these, the interaction of
+``volatile`` and atomics with same-thread signal handling would need
+to be carefully detailed.
-Exception Handling
-------------------
+C++ Exception Handling
+----------------------
-PNaCl currently doesn't support exception handling. It supports the
-usual ``-fno-exceptions`` flag, and by default it transforms all
-``throw`` statements into ``abort``. We plan to add exception-handling
-support in the very near future, and zero-cost exception handling soon
-thereafter.
+PNaCl currently doesn't support C++ exception handling. It supports
+the usual ``-fno-exceptions`` flag, and by default it transforms all
+``throw`` statements into ``abort()`` calls. We plan to add exception
+handling support in the very near future, and zero-cost exception
+handling soon thereafter.
-NaCl supports exception handling.
+NaCl supports C++ exception handling.
Computed ``goto``
-----------------