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

Unified Diff: runtime/bin/file.h

Issue 9569010: Use a pool of native ports for file operations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | runtime/bin/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.h
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index a1fb90ee98a4b2a4e22c5684d268f1b681fe2515..4d9bd4dc5e4341b42a82a3ac83fa4f3cd4ec4756 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -17,6 +17,11 @@ typedef unsigned __int8 uint8_t;
#include <stdio.h>
#include <sys/types.h>
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "platform/globals.h"
+#include "platform/thread.h"
+
// Forward declaration.
class FileHandle;
@@ -123,6 +128,8 @@ class File {
static FileOpenMode DartModeToFileMode(DartFileOpenMode mode);
+ static Dart_Port GetServicePort();
+
private:
File(const char* name, FileHandle* handle) : name_(name), handle_(handle) { }
void Close();
@@ -137,6 +144,11 @@ class File {
// DISALLOW_COPY_AND_ASSIGN(File).
File(const File&);
void operator=(const File&);
+
+ static dart::Mutex mutex_;
+ static int service_ports_size_;
+ static Dart_Port* service_ports_;
+ static int service_ports_index_;
};
#endif // BIN_FILE_H_
« no previous file with comments | « no previous file | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698