Chromium Code Reviews| Index: runtime/include/dart_api.h |
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
| index 7094b4be438cf137201308a8bb68600ad593f5d3..b8549402ac686aa62094046ec28d42e62aae8c6e 100755 |
| --- a/runtime/include/dart_api.h |
| +++ b/runtime/include/dart_api.h |
| @@ -65,25 +65,45 @@ typedef unsigned __int64 uint64_t; |
| #include <assert.h> |
| + |
| /* |
| - * ======= |
| - * Handles |
| - * ======= |
| + * ======== |
| + * Isolates |
| + * ======== |
| */ |
| /** |
| + * A port is used to send or receive inter-isolate messages. It is also used |
| + * to identify an isolate (see Dart_Isolate). |
| + */ |
| +typedef int64_t Dart_Port; |
| + |
| + |
| +/** |
| * An isolate is the unit of concurrency in Dart. Each isolate has |
| * its own memory and thread of control. No state is shared between |
| * isolates. Instead, isolates communicate by message passing. |
| * |
| * Each thread keeps track of its current isolate, which is the |
| * isolate which is ready to execute on the current thread. The |
| - * current isolate may be NULL, in which case no isolate is ready to |
| + * current isolate may be ILLEGAL_ISOLATE, in which case no isolate is ready to |
| * execute. Most of the Dart apis require there to be a current |
| * isolate in order to function without error. The current isolate is |
| * set by any call to Dart_CreateIsolate or Dart_EnterIsolate. |
| */ |
| -typedef struct _Dart_Isolate* Dart_Isolate; |
| +typedef Dart_Port Dart_Isolate; |
| + |
| +/** |
| + * ILLEGAL_ISOLATE is an isolate id that is guaranteed never to be associated |
| + * with a valid isolate. |
| + */ |
| +#define ILLEGAL_ISOLATE ((Dart_Isolate) 0) |
|
Ivan Posva
2015/05/11 04:50:15
Should probably be DART_ILLEGAL_ISOLATE to reduce
Cutch
2015/05/12 03:21:28
Done and done.
|
| + |
| +/* |
| + * ======= |
| + * Handles |
| + * ======= |
| + */ |
| /** |
| * An object reference managed by the Dart VM garbage collector. |
| @@ -1063,11 +1083,6 @@ DART_EXPORT bool Dart_IsolateMakeRunnable(Dart_Isolate isolate); |
| */ |
| /** |
| - * A port is used to send or receive inter-isolate messages |
| - */ |
| -typedef int64_t Dart_Port; |
| - |
| -/** |
| * ILLEGAL_PORT is a port number guaranteed never to be associated with a valid |
| * port. |
| */ |