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

Side by Side Diff: runtime/bin/dbg_connection_android.cc

Issue 371123002: Minor cleanup in use of intptr_t vs int (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/dbg_connection_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_ANDROID) 6 #if defined(TARGET_OS_ANDROID)
7 7
8 #include <errno.h> // NOLINT 8 #include <errno.h> // NOLINT
9 #include <stdio.h> // NOLINT 9 #include <stdio.h> // NOLINT
10 #include <stdlib.h> // NOLINT 10 #include <stdlib.h> // NOLINT
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Sync message. Not yet implemented. 42 // Sync message. Not yet implemented.
43 UNIMPLEMENTED(); 43 UNIMPLEMENTED();
44 } else { 44 } else {
45 Log::Print("unexpected: receiving debugger connection event.\n"); 45 Log::Print("unexpected: receiving debugger connection event.\n");
46 UNIMPLEMENTED(); 46 UNIMPLEMENTED();
47 } 47 }
48 } 48 }
49 49
50 50
51 void DebuggerConnectionImpl::Handler(uword args) { 51 void DebuggerConnectionImpl::Handler(uword args) {
52 static const intptr_t kMaxEvents = 4; 52 static const int kMaxEvents = 4;
53 struct epoll_event events[kMaxEvents]; 53 struct epoll_event events[kMaxEvents];
54 while (1) { 54 while (1) {
55 const int no_timeout = -1; 55 const int no_timeout = -1;
56 intptr_t result = TEMP_FAILURE_RETRY( 56 intptr_t result = TEMP_FAILURE_RETRY(
57 epoll_wait(epoll_fd_, events, kMaxEvents, no_timeout)); 57 epoll_wait(epoll_fd_, events, kMaxEvents, no_timeout));
58 ASSERT(EAGAIN == EWOULDBLOCK); 58 ASSERT(EAGAIN == EWOULDBLOCK);
59 if (result == -1) { 59 if (result == -1) {
60 if (errno != EWOULDBLOCK) { 60 if (errno != EWOULDBLOCK) {
61 perror("epoll_wait failed"); 61 perror("epoll_wait failed");
62 } 62 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 123
124 intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) { 124 intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) {
125 return TEMP_FAILURE_RETRY(read(socket, buf, len)); 125 return TEMP_FAILURE_RETRY(read(socket, buf, len));
126 } 126 }
127 127
128 } // namespace bin 128 } // namespace bin
129 } // namespace dart 129 } // namespace dart
130 130
131 #endif // defined(TARGET_OS_ANDROID) 131 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/dbg_connection_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698