Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / src / include / nacl / nacl_exception.h
index 0b78144..6c51e32 100644 (file)
@@ -242,21 +242,27 @@ nacl_exception_context_get_portable(struct NaClExceptionContext *context) {
 typedef void (*nacl_exception_handler_t)(struct NaClExceptionContext *context);
 
 /*
- * The following functions return 0 on success or an errno value on
- * failure.
- */
-
-/*
  * Set the exception handler function.  This applies to all threads in
  * the process.  In this regard, this API is similar to signal() or
  * sigaction() in POSIX.
+ * @return 0 on success. A positive errno value on error.
  */
 int nacl_exception_set_handler(nacl_exception_handler_t handler);
 
 /*
+ * Set the exception handler function and obtain the previous handler.
+ * This applies to all threads in the process. |old| may be NULL in
+ * which case previous handler is not obtained.
+ * @return 0 on success. A positive errno value on error.
+ */
+int nacl_exception_get_and_set_handler(nacl_exception_handler_t handler,
+                                       nacl_exception_handler_t *old);
+
+/*
  * Set the stack that the exception handler will run on.  This applies
  * to the current thread only.  This API is similar to sigaltstack()
  * in POSIX.
+ * @return 0 on success. A positive errno value on error.
  */
 int nacl_exception_set_stack(void *stack, size_t size);
 
@@ -272,6 +278,7 @@ int nacl_exception_set_stack(void *stack, size_t size);
  *
  * The exception flag is similar to signal masks in POSIX.
  * nacl_exception_clear_flag() is similar to sigprocmask() in POSIX.
+ * @return 0 on success. A positive errno value on error.
  */
 int nacl_exception_clear_flag(void);