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

Unified Diff: util/mach/mach_extensions.h

Issue 1058523002: Add ConstThreadState to mach_extensions.h and use it everywhere (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: clang-unformat Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/mach/exception_ports_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_extensions.h
diff --git a/util/mach/mach_extensions.h b/util/mach/mach_extensions.h
index 6c378ca688f46834482ef47e7e30f7a153973a67..d1e392ad7a55f90682f8bed1bc1618816eb7aa1a 100644
--- a/util/mach/mach_extensions.h
+++ b/util/mach/mach_extensions.h
@@ -47,6 +47,13 @@ const exception_behavior_t kMachExceptionCodes = MACH_EXCEPTION_CODES;
//! \brief An exception type to use for simulated exceptions.
const exception_type_t kMachExceptionSimulated = 'CPsx';
+//! \brief A const version of `thread_state_t`.
+//!
+//! This is useful as the \a old_state parameter to exception handler functions.
+//! Normally, these parameters are of type `thread_state_t`, but this allows
+//! modification of the state, which is conceptually `const`.
+using ConstThreadState = const natural_t*;
+
//! \brief Like `mach_thread_self()`, but without the obligation to release the
//! send right.
//!
« no previous file with comments | « util/mach/exception_ports_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698