| Index: runtime/bin/eventhandler_linux.cc
|
| diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
|
| index 296fafba1ebdbab2b81486fe0c9df0974336c127..43d65a6caaeb58017b7d075ef5f29dc6252d7494 100644
|
| --- a/runtime/bin/eventhandler_linux.cc
|
| +++ b/runtime/bin/eventhandler_linux.cc
|
| @@ -2,6 +2,8 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +#include "bin/eventhandler.h"
|
| +
|
| #include <errno.h>
|
| #include <poll.h>
|
| #include <pthread.h>
|
| @@ -10,7 +12,6 @@
|
| #include <sys/time.h>
|
| #include <unistd.h>
|
|
|
| -#include "bin/eventhandler.h"
|
| #include "bin/fdutils.h"
|
|
|
|
|
| @@ -341,7 +342,7 @@ void EventHandlerImplementation::HandleTimeout() {
|
| }
|
|
|
|
|
| -void* EventHandlerImplementation::Poll(void* args) {
|
| +void EventHandlerImplementation::Poll(uword args) {
|
| intptr_t pollfds_size;
|
| struct pollfd* pollfds;
|
| EventHandlerImplementation* handler =
|
| @@ -361,17 +362,13 @@ void* EventHandlerImplementation::Poll(void* args) {
|
| }
|
| free(pollfds);
|
| }
|
| - return NULL;
|
| }
|
|
|
|
|
| void EventHandlerImplementation::StartEventHandler() {
|
| - pthread_t handler_thread;
|
| - int result = pthread_create(&handler_thread,
|
| - NULL,
|
| - &EventHandlerImplementation::Poll,
|
| - this);
|
| - if (result != 0) {
|
| + dart::ThreadHandle handle = dart::Thread::Start(
|
| + &EventHandlerImplementation::Poll, reinterpret_cast<uword>(this));
|
| + if (handle == dart::Thread::kInvalidThreadHandle) {
|
| FATAL("Create start event handler thread");
|
| }
|
| }
|
|
|