2010-04-19 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / metadata / sgen-protocol.h
blob867706377a2d214d2b4ddfda547e705d2a51d9e0
1 /*
2 * Copyright 2001-2003 Ximian, Inc
3 * Copyright 2003-2010 Novell, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 enum {
25 SGEN_PROTOCOL_COLLECTION,
26 SGEN_PROTOCOL_ALLOC,
27 SGEN_PROTOCOL_COPY,
28 SGEN_PROTOCOL_PIN,
29 SGEN_PROTOCOL_WBARRIER,
30 SGEN_PROTOCOL_GLOBAL_REMSET,
31 SGEN_PROTOCOL_PTR_UPDATE,
32 SGEN_PROTOCOL_CLEANUP,
33 SGEN_PROTOCOL_EMPTY,
34 SGEN_PROTOCOL_THREAD_RESTART,
35 SGEN_PROTOCOL_THREAD_REGISTER,
36 SGEN_PROTOCOL_THREAD_UNREGISTER,
37 SGEN_PROTOCOL_MISSING_REMSET
40 typedef struct {
41 int generation;
42 } SGenProtocolCollection;
44 typedef struct {
45 gpointer obj;
46 gpointer vtable;
47 int size;
48 } SGenProtocolAlloc;
50 typedef struct {
51 gpointer from;
52 gpointer to;
53 gpointer vtable;
54 int size;
55 } SGenProtocolCopy;
57 typedef struct {
58 gpointer obj;
59 gpointer vtable;
60 int size;
61 } SGenProtocolPin;
63 typedef struct {
64 gpointer ptr;
65 gpointer value;
66 gpointer value_vtable;
67 } SGenProtocolWBarrier;
69 typedef struct {
70 gpointer ptr;
71 gpointer value;
72 gpointer value_vtable;
73 } SGenProtocolGlobalRemset;
75 typedef struct {
76 gpointer ptr;
77 gpointer old_value;
78 gpointer new_value;
79 gpointer vtable;
80 int size;
81 } SGenProtocolPtrUpdate;
83 typedef struct {
84 gpointer ptr;
85 gpointer vtable;
86 int size;
87 } SGenProtocolCleanup;
89 typedef struct {
90 gpointer start;
91 int size;
92 } SGenProtocolEmpty;
94 typedef struct {
95 gpointer thread;
96 } SGenProtocolThreadRestart;
98 typedef struct {
99 gpointer thread;
100 } SGenProtocolThreadRegister;
102 typedef struct {
103 gpointer thread;
104 } SGenProtocolThreadUnregister;
106 typedef struct {
107 gpointer obj;
108 gpointer obj_vtable;
109 int offset;
110 gpointer value;
111 gpointer value_vtable;
112 int value_pinned;
113 } SGenProtocolMissingRemset;
115 /* missing: finalizers, dislinks, roots, non-store wbarriers */