| Index: src/platform-openbsd.cc
|
| ===================================================================
|
| --- src/platform-openbsd.cc (revision 6941)
|
| +++ src/platform-openbsd.cc (working copy)
|
| @@ -389,9 +389,17 @@
|
| Thread::Thread(Isolate* isolate)
|
| : ThreadHandle(ThreadHandle::INVALID),
|
| isolate_(isolate) {
|
| + set_name("v8:<unknown>");
|
| }
|
|
|
|
|
| +Thread::Thread(Isolate* isolate, const char* name)
|
| + : ThreadHandle(ThreadHandle::INVALID),
|
| + isolate_(isolate) {
|
| + set_name(name);
|
| +}
|
| +
|
| +
|
| Thread::~Thread() {
|
| }
|
|
|
| @@ -409,6 +417,12 @@
|
| }
|
|
|
|
|
| +void Thread::set_name(const char* name) {
|
| + strncpy(name_, name, sizeof(name_));
|
| + name_[sizeof(name_) - 1] = '\0';
|
| +}
|
| +
|
| +
|
| void Thread::Start() {
|
| pthread_create(&thread_handle_data()->thread_, NULL, ThreadEntry, this);
|
| ASSERT(IsValid());
|
|
|