Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "nacl_io/mount_node_tty.h" | 5 #include "nacl_io/mount_node_tty.h" |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <signal.h> | 9 #include <signal.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 } | 217 } |
| 218 | 218 |
| 219 if (!skip) | 219 if (!skip) |
| 220 input_buffer_.push_back(c); | 220 input_buffer_.push_back(c); |
| 221 | 221 |
| 222 if (c == '\n' || c == termios_.c_cc[VEOF] || !IS_ICANON) | 222 if (c == '\n' || c == termios_.c_cc[VEOF] || !IS_ICANON) |
| 223 is_readable_ = true; | 223 is_readable_ = true; |
| 224 } | 224 } |
| 225 | 225 |
| 226 if (is_readable_) { | 226 if (is_readable_) { |
| 227 RaiseEvent(POLLIN); | 227 // RaiseEvent(POLLIN); |
|
binji
2013/09/12 01:47:57
Why removed? If necessary to remove, add TODO? Als
noelallen1
2013/09/12 23:19:03
Part of TTY CL.
| |
| 228 pthread_cond_broadcast(&is_readable_cond_); | 228 pthread_cond_broadcast(&is_readable_cond_); |
| 229 } | 229 } |
| 230 | 230 |
| 231 return 0; | 231 return 0; |
| 232 } | 232 } |
| 233 | 233 |
| 234 Error MountNodeTty::Ioctl(int request, char* arg) { | 234 Error MountNodeTty::Ioctl(int request, char* arg) { |
| 235 switch (request) { | 235 switch (request) { |
| 236 case TIOCNACLOUTPUT: { | 236 case TIOCNACLOUTPUT: { |
| 237 AUTO_LOCK(output_lock_); | 237 AUTO_LOCK(output_lock_); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 } | 286 } |
| 287 | 287 |
| 288 Error MountNodeTty::Tcsetattr(int optional_actions, | 288 Error MountNodeTty::Tcsetattr(int optional_actions, |
| 289 const struct termios *termios_p) { | 289 const struct termios *termios_p) { |
| 290 AUTO_LOCK(node_lock_); | 290 AUTO_LOCK(node_lock_); |
| 291 termios_ = *termios_p; | 291 termios_ = *termios_p; |
| 292 return 0; | 292 return 0; |
| 293 } | 293 } |
| 294 | 294 |
| 295 } | 295 } |
| OLD | NEW |