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

Unified Diff: runtime/bin/eventhandler_fuchsia.cc

Issue 2458703004: Use 'mx_channel' instead of deprecated 'mx_msgpipe' naming (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_fuchsia.cc
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index 0d52f55cae07abe1df2558404b6fae8799066e4d..4b325466c102f27881509ef92e70c3f6a8f619d2 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -144,9 +144,10 @@ void MagentaWaitManyInfo::GrowArraysIfNeeded(intptr_t desired_size) {
EventHandlerImplementation::EventHandlerImplementation() {
- mx_status_t status = mx_msgpipe_create(interrupt_handles_, 0);
+ mx_status_t status = mx_channel_create(0, &interrupt_handles_[0],
+ &interrupt_handles_[1]);
if (status != NO_ERROR) {
- FATAL1("mx_msgpipe_create failed: %s\n", mx_status_get_string(status));
+ FATAL1("mx_channel_create failed: %s\n", mx_status_get_string(status));
}
shutdown_ = false;
info_.AddHandle(interrupt_handles_[0],
@@ -178,9 +179,9 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id,
msg.data = data;
mx_status_t status =
- mx_msgpipe_write(interrupt_handles_[1], &msg, sizeof(msg), NULL, 0, 0);
+ mx_channel_write(interrupt_handles_[1], 0, &msg, sizeof(msg), NULL, 0);
if (status != NO_ERROR) {
- FATAL1("mx_msgpipe_write failed: %s\n", mx_status_get_string(status));
+ FATAL1("mx_channel_write failed: %s\n", mx_status_get_string(status));
}
LOG_INFO("WakeupHandler(%ld, %ld, %lld)\n", id, dart_port, data);
}
@@ -192,8 +193,8 @@ void EventHandlerImplementation::HandleInterruptFd() {
uint32_t bytes = kInterruptMessageSize;
mx_status_t status;
while (true) {
- status = mx_msgpipe_read(
- interrupt_handles_[0], &msg, &bytes, NULL, NULL, 0);
+ status = mx_channel_read(
+ interrupt_handles_[0], 0, &msg, bytes, &bytes, NULL, 0, NULL);
if (status != NO_ERROR) {
break;
}
@@ -213,7 +214,7 @@ void EventHandlerImplementation::HandleInterruptFd() {
// status == ERR_SHOULD_WAIT when we try to read and there are no messages
// available, so it is an error if we get here and status != ERR_SHOULD_WAIT.
if (status != ERR_SHOULD_WAIT) {
- FATAL1("mx_msgpipe_read failed: %s\n", mx_status_get_string(status));
+ FATAL1("mx_channel_read failed: %s\n", mx_status_get_string(status));
}
LOG_INFO("HandleInterruptFd exit\n");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698