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

Side by Side Diff: src/vm/thread_windows.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_windows.h ('k') | src/vm/tick_queue.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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_WIN) 5 #if defined(DARTINO_TARGET_OS_WIN)
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 "src/shared/platform.h" 9 #include "src/shared/platform.h"
10 #include "src/shared/utils.h" 10 #include "src/shared/utils.h"
11 11
12 namespace fletch { 12 namespace dartino {
13 13
14 static const int kFletchStackSize = 4096; 14 static const int kDartinoStackSize = 4096;
15 15
16 void Thread::SetProcess(Process* process) { 16 void Thread::SetProcess(Process* process) {
17 // Unused since tick sample is not available on Windows. 17 // Unused since tick sample is not available on Windows.
18 } 18 }
19 19
20 Process* Thread::GetProcess() { 20 Process* Thread::GetProcess() {
21 // Unused since tick sample is not available on Windows. 21 // Unused since tick sample is not available on Windows.
22 return NULL; 22 return NULL;
23 } 23 }
24 24
25 bool Thread::IsCurrent(const ThreadIdentifier* thread) { 25 bool Thread::IsCurrent(const ThreadIdentifier* thread) {
26 return thread->IsSelf(); 26 return thread->IsSelf();
27 } 27 }
28 28
29 void Thread::Setup() {} 29 void Thread::Setup() {}
30 30
31 void Thread::TearDown() {} 31 void Thread::TearDown() {}
32 32
33 void Thread::SetupOSSignals() { 33 void Thread::SetupOSSignals() {
34 // Platform doesn't have signals. 34 // Platform doesn't have signals.
35 } 35 }
36 36
37 void Thread::TeardownOSSignals() { 37 void Thread::TeardownOSSignals() {
38 // Platform doesn't have signals. 38 // Platform doesn't have signals.
39 } 39 }
40 40
41 ThreadIdentifier Thread::Run(RunSignature run, void* data) { 41 ThreadIdentifier Thread::Run(RunSignature run, void* data) {
42 HANDLE thread = CreateThread(NULL, kFletchStackSize, 42 HANDLE thread = CreateThread(NULL, kDartinoStackSize,
43 reinterpret_cast<LPTHREAD_START_ROUTINE>(run), 43 reinterpret_cast<LPTHREAD_START_ROUTINE>(run),
44 data, 0, NULL); 44 data, 0, NULL);
45 if (thread == NULL) { 45 if (thread == NULL) {
46 FATAL("CreateThread failed\n"); 46 FATAL("CreateThread failed\n");
47 } 47 }
48 return ThreadIdentifier(thread); 48 return ThreadIdentifier(thread);
49 } 49 }
50 50
51 } // namespace fletch 51 } // namespace dartino
52 52
53 #endif // defined(FLETCH_TARGET_OS_WIN) 53 #endif // defined(DARTINO_TARGET_OS_WIN)
OLDNEW
« no previous file with comments | « src/vm/thread_windows.h ('k') | src/vm/tick_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698