2 * Copyright 2001-2003 Ximian, Inc
3 * Copyright 2003-2010 Novell, Inc.
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.
25 #ifdef SGEN_BINARY_PROTOCOL
28 SGEN_PROTOCOL_COLLECTION,
33 SGEN_PROTOCOL_WBARRIER,
34 SGEN_PROTOCOL_GLOBAL_REMSET,
35 SGEN_PROTOCOL_PTR_UPDATE,
36 SGEN_PROTOCOL_CLEANUP,
38 SGEN_PROTOCOL_THREAD_RESTART,
39 SGEN_PROTOCOL_THREAD_REGISTER,
40 SGEN_PROTOCOL_THREAD_UNREGISTER,
41 SGEN_PROTOCOL_MISSING_REMSET,
42 SGEN_PROTOCOL_ALLOC_PINNED,
43 SGEN_PROTOCOL_ALLOC_DEGRADED
48 } SGenProtocolCollection;
78 gpointer value_vtable;
79 } SGenProtocolWBarrier;
84 gpointer value_vtable;
85 } SGenProtocolGlobalRemset;
93 } SGenProtocolPtrUpdate;
99 } SGenProtocolCleanup;
108 } SGenProtocolThreadRestart;
112 } SGenProtocolThreadRegister;
116 } SGenProtocolThreadUnregister;
123 gpointer value_vtable;
125 } SGenProtocolMissingRemset;
127 /* missing: finalizers, dislinks, roots, non-store wbarriers */
129 void binary_protocol_collection (int generation) MONO_INTERNAL;
130 void binary_protocol_alloc (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
131 void binary_protocol_alloc_pinned (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
132 void binary_protocol_alloc_degraded (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
133 void binary_protocol_copy (gpointer from, gpointer to, gpointer vtable, int size) MONO_INTERNAL;
134 void binary_protocol_pin (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
135 void binary_protocol_mark (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
136 void binary_protocol_wbarrier (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
137 void binary_protocol_global_remset (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
138 void binary_protocol_ptr_update (gpointer ptr, gpointer old_value, gpointer new_value, gpointer vtable, int size) MONO_INTERNAL;
139 void binary_protocol_cleanup (gpointer ptr, gpointer vtable, int size) MONO_INTERNAL;
140 void binary_protocol_empty (gpointer start, int size) MONO_INTERNAL;
141 void binary_protocol_thread_restart (gpointer thread) MONO_INTERNAL;
142 void binary_protocol_thread_register (gpointer thread) MONO_INTERNAL;
143 void binary_protocol_thread_unregister (gpointer thread) MONO_INTERNAL;
144 void binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offset,
145 gpointer value, gpointer value_vtable, int value_pinned) MONO_INTERNAL;
149 #define binary_protocol_flush_buffers(force)
150 #define binary_protocol_collection(generation)
151 #define binary_protocol_alloc(obj, vtable, size)
152 #define binary_protocol_alloc_pinned(obj, vtable, size)
153 #define binary_protocol_alloc_degraded(obj, vtable, size)
154 #define binary_protocol_copy(from, to, vtable, size)
155 #define binary_protocol_pin(obj, vtable, size)
156 #define binary_protocol_mark(obj, vtable, size)
157 #define binary_protocol_wbarrier(ptr, value, value_vtable)
158 #define binary_protocol_global_remset(ptr, value, value_vtable)
159 #define binary_protocol_ptr_update(ptr, old_value, new_value, vtable, size)
160 #define binary_protocol_cleanup(ptr, vtable, size)
161 #define binary_protocol_empty(start, size)
162 #define binary_protocol_thread_restart(thread)
163 #define binary_protocol_thread_register(thread)
164 #define binary_protocol_thread_unregister(thread)
165 #define binary_protocol_missing_remset(obj, obj_vtable, offset, value, value_vtable, value_pinned)