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

Unified Diff: src/platform.h

Issue 6577036: [Isolates] Merge from bleeding_edge to isolates, revisions 6100-6300. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 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 | « src/parser.cc ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
===================================================================
--- src/platform.h (revision 6941)
+++ src/platform.h (working copy)
@@ -387,6 +387,7 @@
// Create new thread (with a value for storing in the TLS isolate field).
explicit Thread(Isolate* isolate);
+ Thread(Isolate* isolate, const char* name);
virtual ~Thread();
// Start new thread by calling the Run() method in the new thread.
@@ -395,6 +396,10 @@
// Wait until thread terminates.
void Join();
+ inline const char* name() const {
+ return name_;
+ }
+
// Abstract method for run handler.
virtual void Run() = 0;
@@ -418,10 +423,17 @@
Isolate* isolate() const { return isolate_; }
+ // The thread name length is limited to 16 based on Linux's implementation of
+ // prctl().
+ static const int kMaxThreadNameLength = 16;
private:
+ void set_name(const char *name);
+
class PlatformData;
PlatformData* data_;
Isolate* isolate_;
+ char name_[kMaxThreadNameLength];
+
DISALLOW_COPY_AND_ASSIGN(Thread);
};
« no previous file with comments | « src/parser.cc ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698