Merge pull request #853 from echampet/onclick
[mono.git] / mono / mini / tasklets.h
1 #ifndef __MONO_TASKLETS_H__
2 #define __MONO_TASKLETS_H__
3
4 #include "mini.h"
5
6 typedef struct {
7         MonoLMF *lmf;
8         gpointer top_sp;
9         gsize thread_id;
10         MonoDomain *domain;
11
12         /* the instruction pointer and stack to return to on Restore */
13         gpointer return_ip;
14         gpointer return_sp;
15
16         /* the saved stack information */
17         int stack_alloc_size;
18         int stack_used_size;
19         /* pointer to GC memory */
20         gpointer saved_stack;
21 } MonoContinuation;
22
23 typedef void (*MonoContinuationRestore) (MonoContinuation *cont, int state, MonoLMF **lmf_addr);
24
25 void  mono_tasklets_init    (void);
26 void  mono_tasklets_cleanup (void);
27
28 MonoContinuationRestore mono_tasklets_arch_restore (void);
29
30 #endif /* __MONO_TASKLETS_H__ */
31