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

Side by Side Diff: src/vm/thread_posix.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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 unified diff | Download patch
« no previous file with comments | « src/vm/thread_posix.h ('k') | src/vm/thread_windows.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #if defined(FLETCH_TARGET_OS_POSIX) 5 #if defined(DARTINO_TARGET_OS_POSIX)
6 6
7 #include "src/vm/thread.h" // NOLINT we don't include thread_posix.h. 7 #include "src/vm/thread.h" // NOLINT we don't include thread_posix.h.
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <stdio.h> 10 #include <stdio.h>
11 #include <sys/time.h> 11 #include <sys/time.h>
12 12
13 #include "src/shared/platform.h" 13 #include "src/shared/platform.h"
14 #include "src/shared/utils.h" 14 #include "src/shared/utils.h"
15 15
16 #include "src/vm/tick_sampler.h" 16 #include "src/vm/tick_sampler.h"
17 17
18 namespace fletch { 18 namespace dartino {
19 19
20 bool Thread::IsCurrent(const ThreadIdentifier* thread) { 20 bool Thread::IsCurrent(const ThreadIdentifier* thread) {
21 return thread->IsSelf(); 21 return thread->IsSelf();
22 } 22 }
23 23
24 static pthread_key_t thr_id_key; 24 static pthread_key_t thr_id_key;
25 25
26 void Thread::SetProcess(Process* process) { 26 void Thread::SetProcess(Process* process) {
27 pthread_setspecific(thr_id_key, static_cast<void*>(process)); 27 pthread_setspecific(thr_id_key, static_cast<void*>(process));
28 } 28 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (result == EAGAIN) { 73 if (result == EAGAIN) {
74 Print::Error("Insufficient resources\n"); 74 Print::Error("Insufficient resources\n");
75 } else { 75 } else {
76 Print::Error("Error %d", result); 76 Print::Error("Error %d", result);
77 } 77 }
78 FATAL1("pthread_create failed with error %d\n", result); 78 FATAL1("pthread_create failed with error %d\n", result);
79 } 79 }
80 return ThreadIdentifier(thread); 80 return ThreadIdentifier(thread);
81 } 81 }
82 82
83 } // namespace fletch 83 } // namespace dartino
84 84
85 #endif // defined(FLETCH_TARGET_OS_POSIX) 85 #endif // defined(DARTINO_TARGET_OS_POSIX)
OLDNEW
« no previous file with comments | « src/vm/thread_posix.h ('k') | src/vm/thread_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698