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

Side by Side Diff: runtime/bin/process.h

Issue 285023002: Fix listening for multiple signals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/process_android.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 #ifndef BIN_PROCESS_H_ 5 #ifndef BIN_PROCESS_H_
6 #define BIN_PROCESS_H_ 6 #define BIN_PROCESS_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/io_buffer.h" 9 #include "bin/io_buffer.h"
10 #include "bin/thread.h" 10 #include "bin/thread.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 static int global_exit_code_; 131 static int global_exit_code_;
132 static dart::Mutex* global_exit_code_mutex_; 132 static dart::Mutex* global_exit_code_mutex_;
133 133
134 DISALLOW_ALLOCATION(); 134 DISALLOW_ALLOCATION();
135 DISALLOW_IMPLICIT_CONSTRUCTORS(Process); 135 DISALLOW_IMPLICIT_CONSTRUCTORS(Process);
136 }; 136 };
137 137
138 138
139 class SignalInfo { 139 class SignalInfo {
140 public: 140 public:
141 SignalInfo(int fd, int signal, SignalInfo* prev = NULL) 141 SignalInfo(int fd, int signal, SignalInfo* next = NULL)
142 : fd_(fd), 142 : fd_(fd),
143 signal_(signal), 143 signal_(signal),
144 // SignalInfo is expected to be created when in a isolate. 144 // SignalInfo is expected to be created when in a isolate.
145 port_(Dart_GetMainPortId()), 145 port_(Dart_GetMainPortId()),
146 next_(NULL), 146 next_(next),
147 prev_(prev) { 147 prev_(NULL) {
148 if (prev_ != NULL) { 148 if (next_ != NULL) {
149 prev_->next_ = this; 149 next_->prev_ = this;
150 } 150 }
151 } 151 }
152 152
153 ~SignalInfo(); 153 ~SignalInfo();
154 154
155 void Unlink() { 155 void Unlink() {
156 if (prev_ != NULL) { 156 if (prev_ != NULL) {
157 prev_->next_ = next_; 157 prev_->next_ = next_;
158 } 158 }
159 if (next_ != NULL) { 159 if (next_ != NULL) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 intptr_t data_size_; 274 intptr_t data_size_;
275 275
276 // Number of free bytes in the last node in the list. 276 // Number of free bytes in the last node in the list.
277 intptr_t free_size_; 277 intptr_t free_size_;
278 }; 278 };
279 279
280 } // namespace bin 280 } // namespace bin
281 } // namespace dart 281 } // namespace dart
282 282
283 #endif // BIN_PROCESS_H_ 283 #endif // BIN_PROCESS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/process_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698