Chromium Code Reviews| Index: runtime/bin/eventhandler_linux.cc |
| diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc |
| index 6d15c9efaeb3f3b3159769e0a9c2b1334baf1c42..e95def62e03fac42e76faef28f8767d2b4110b68 100644 |
| --- a/runtime/bin/eventhandler_linux.cc |
| +++ b/runtime/bin/eventhandler_linux.cc |
| @@ -165,6 +165,9 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id, |
| msg.id = id; |
| msg.dart_port = dart_port; |
| msg.data = data; |
| + // WriteToBlocking will write up to 512 bytes atomically, and since our msg |
| + // is smaller than 512, we don't need a thread lock. |
| + // See: http://linux.die.net/man/7/pipe, section 'Pipe_buf'. |
|
Ivan Posva
2013/08/23 00:14:16
You should probably ASSERT(kInterruptMessageSize <
Anders Johnsen
2013/08/23 05:15:27
Good idea.
|
| intptr_t result = |
| FDUtils::WriteToBlocking(interrupt_fds_[1], &msg, kInterruptMessageSize); |
| if (result != kInterruptMessageSize) { |