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

Side by Side Diff: src/vm/mailbox.h

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/lookup_cache.cc ('k') | src/vm/main.cc » ('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 #ifndef SRC_VM_MAILBOX_H_ 5 #ifndef SRC_VM_MAILBOX_H_
6 #define SRC_VM_MAILBOX_H_ 6 #define SRC_VM_MAILBOX_H_
7 7
8 #include "src/shared/globals.h" 8 #include "src/shared/globals.h"
9 #include "src/shared/atomic.h" 9 #include "src/shared/atomic.h"
10 10
11 #include "src/vm/object.h" 11 #include "src/vm/object.h"
12 12
13 namespace fletch { 13 namespace dartino {
14 14
15 template <typename MessageType> 15 template <typename MessageType>
16 class Mailbox { 16 class Mailbox {
17 public: 17 public:
18 Mailbox() : last_message_(NULL), current_message_(NULL) {} 18 Mailbox() : last_message_(NULL), current_message_(NULL) {}
19 ~Mailbox() { 19 ~Mailbox() {
20 while (last_message_.load() != NULL) { 20 while (last_message_.load() != NULL) {
21 MessageType* entry = last_message_; 21 MessageType* entry = last_message_;
22 last_message_ = entry->next(); 22 last_message_ = entry->next();
23 delete entry; 23 delete entry;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 public: 100 public:
101 MailboxMessage() : next_(NULL) {} 101 MailboxMessage() : next_(NULL) {}
102 102
103 MessageType* next() const { return next_; } 103 MessageType* next() const { return next_; }
104 void set_next(MessageType* next) { next_ = next; } 104 void set_next(MessageType* next) { next_ = next; }
105 105
106 private: 106 private:
107 MessageType* next_; 107 MessageType* next_;
108 }; 108 };
109 109
110 } // namespace fletch 110 } // namespace dartino
111 111
112 #endif // SRC_VM_MAILBOX_H_ 112 #endif // SRC_VM_MAILBOX_H_
OLDNEW
« no previous file with comments | « src/vm/lookup_cache.cc ('k') | src/vm/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698