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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node_tty.h

Issue 23075013: [NaCl SDK] Enable select/poll on TTY nodes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io/mount_node_tty.h
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_tty.h b/native_client_sdk/src/libraries/nacl_io/mount_node_tty.h
index 0707420a0c8acc11737c56c5aa78fe5184d7774b..87c8191506d3fd0b0b7bb10479defd83afac9c00 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node_tty.h
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node_tty.h
@@ -5,6 +5,7 @@
#ifndef LIBRARIES_NACL_IO_MOUNT_NODE_TTY_H_
#define LIBRARIES_NACL_IO_MOUNT_NODE_TTY_H_
+#include <poll.h>
#include <pthread.h>
#include <deque>
@@ -38,6 +39,13 @@ class MountNodeTty : public MountNodeCharDevice {
virtual Error Tcsetattr(int optional_actions,
const struct termios *termios_p);
+ virtual uint32_t GetEventStatus() {
+ uint32_t status = POLLOUT;
+ if (is_readable_)
+ status |= POLLIN;
+ return status;
+ }
+
private:
virtual Error Write(size_t offs,
const void* buf,
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_node_char.h ('k') | native_client_sdk/src/libraries/nacl_io/mount_node_tty.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698