Skip to content

Commit

Permalink
Bugfix and msg_id in encore.c/h
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasC committed Feb 4, 2015
1 parent 1bd7831 commit 6660676
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/encore/encore.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include <pony/pony.h>
#include "encore.h"

/// The starting point of all Encore programs
int encore_start(int argc, char** argv, encore_actor_t *type)
{
argc = pony_init(argc, argv);
pony_actor_t* actor = pony_create(type);
pony_sendargs(actor, MSG_ARGS, argc, argv);
pony_sendargs(actor, _ENC__MSG_MAIN, argc, argv);

return pony_start(PONY_DONT_WAIT);
}
8 changes: 8 additions & 0 deletions src/runtime/encore/encore.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ typedef enum {
CLOSURE_ID = 0
} encore_type_id;

typedef enum {
_ENC__MSG_RESUME_GET,
_ENC__MSG_RESUME_SUSPEND,
_ENC__MSG_RESUME_AWAIT,
_ENC__MSG_RUN_CLOSURE,
_ENC__MSG_MAIN,
} encore_msg_id;

typedef struct encore_actor encore_actor_t;

struct encore_actor
Expand Down

0 comments on commit 6660676

Please sign in to comment.