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

Side by Side Diff: vm/port.h

Issue 11052006: 1. Create a port when a debugger object is created for an isolate, use this (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « vm/message_handler.h ('k') | vm/port.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_PORT_H_ 5 #ifndef VM_PORT_H_
6 #define VM_PORT_H_ 6 #define VM_PORT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // Enqueues the message in the port with id. Returns false if the port is not 37 // Enqueues the message in the port with id. Returns false if the port is not
38 // active any longer. 38 // active any longer.
39 // 39 //
40 // Claims ownership of 'message'. 40 // Claims ownership of 'message'.
41 static bool PostMessage(Message* message); 41 static bool PostMessage(Message* message);
42 42
43 // Returns whether a port is local to the current isolate. 43 // Returns whether a port is local to the current isolate.
44 static bool IsLocalPort(Dart_Port id); 44 static bool IsLocalPort(Dart_Port id);
45 45
46 // Returns the owning Isolate for port 'id'.
47 static Isolate* GetIsolate(Dart_Port id);
48
46 static void InitOnce(); 49 static void InitOnce();
47 50
48 private: 51 private:
49 friend class dart::PortMapTestPeer; 52 friend class dart::PortMapTestPeer;
50 53
51 // Mapping between port numbers and handlers. 54 // Mapping between port numbers and handlers.
52 // 55 //
53 // Free entries have id == 0 and handler == NULL. Deleted entries 56 // Free entries have id == 0 and handler == NULL. Deleted entries
54 // have id == 0 and handler == deleted_entry_. 57 // have id == 0 and handler == deleted_entry_.
55 typedef struct { 58 typedef struct {
(...skipping 22 matching lines...) Expand all
78 static intptr_t capacity_; 81 static intptr_t capacity_;
79 static intptr_t used_; 82 static intptr_t used_;
80 static intptr_t deleted_; 83 static intptr_t deleted_;
81 84
82 static Dart_Port next_port_; 85 static Dart_Port next_port_;
83 }; 86 };
84 87
85 } // namespace dart 88 } // namespace dart
86 89
87 #endif // VM_PORT_H_ 90 #endif // VM_PORT_H_
OLDNEW
« no previous file with comments | « vm/message_handler.h ('k') | vm/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698