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

Unified Diff: util/mach/mach_extensions.h

Issue 809103002: Add NewMachPort() and its test, and switch call sites to use it (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years 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/child_port_handshake.cc ('k') | util/mach/mach_extensions.cc » ('j') | 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 5b247f88b9e80aa1009ce4c4a65514e3c3798520..6c378ca688f46834482ef47e7e30f7a153973a67 100644
--- a/util/mach/mach_extensions.h
+++ b/util/mach/mach_extensions.h
@@ -67,6 +67,17 @@ const exception_type_t kMachExceptionSimulated = 'CPsx';
//! thread continues to exist as a `pthread_t`.
thread_t MachThreadSelf();
+//! \brief Creates a new Mach port in the current task.
+//!
+//! This function wraps the `mach_port_allocate()` providing a simpler
+//! interface.
+//!
+//! \param[in] right The type of right to create.
+//!
+//! \return The new Mach port. On failure, `MACH_PORT_NULL` with a message
+//! logged.
+mach_port_t NewMachPort(mach_port_right_t right);
+
//! \brief The value for `EXC_MASK_ALL` appropriate for the operating system at
//! run time.
//!
« no previous file with comments | « util/mach/child_port_handshake.cc ('k') | util/mach/mach_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698