Mercurial > repos > rhope
comparison runtime/context.h @ 140:c14698c512f1
Untested addition of Pause/Resume
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 20 Nov 2010 20:03:25 +0000 |
parents | a68e6828d896 |
children | f2cb85c53ced |
comparison
equal
deleted
inserted
replaced
139:a68e6828d896 | 140:c14698c512f1 |
---|---|
14 char *free_space; | 14 char *free_space; |
15 char data[STACK_CHUNK_SIZE]; | 15 char data[STACK_CHUNK_SIZE]; |
16 } stackchunk; | 16 } stackchunk; |
17 | 17 |
18 typedef struct context { | 18 typedef struct context { |
19 stackchunk *stack_begin; | 19 stackchunk *stack_begin; |
20 stackchunk *current_stack; | 20 stackchunk *current_stack; |
21 transaction *transaction; | 21 transaction *transaction; |
22 struct context *runafter; | |
23 calldata *resume_cdata; | |
24 int32_t resumeable; | |
25 int32_t start_func; | |
22 } context; | 26 } context; |
23 | 27 |
28 Box(context *,ct,Context); | |
24 stackchunk * new_stack(); | 29 stackchunk * new_stack(); |
25 context * new_context(); | 30 context * new_context(); |
26 void * alloc_stack(context * ct, uint32_t size); | 31 void * alloc_stack(context * ct, uint32_t size); |
27 calldata * alloc_cdata(context * ct, calldata * lastframe, uint32_t num_params); | 32 calldata * alloc_cdata(context * ct, calldata * lastframe, uint32_t num_params); |
28 void free_stack(context * ct, void * data); | 33 void free_stack(context * ct, void * data); |
29 void free_context(context * c); | 34 void free_context(context * c); |
35 void cqueue_init(); | |
36 context * get_cqueue(); | |
37 int32_t put_cqueue(context * ct); | |
30 #endif //_CONTEXT_H_ | 38 #endif //_CONTEXT_H_ |