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.
27 #ifdef SGEN_BINARY_PROTOCOL
30 SGEN_PROTOCOL_COLLECTION,
35 SGEN_PROTOCOL_WBARRIER,
36 SGEN_PROTOCOL_GLOBAL_REMSET,
37 SGEN_PROTOCOL_PTR_UPDATE,
38 SGEN_PROTOCOL_CLEANUP,
40 SGEN_PROTOCOL_THREAD_RESTART,
41 SGEN_PROTOCOL_THREAD_REGISTER,
42 SGEN_PROTOCOL_THREAD_UNREGISTER,
43 SGEN_PROTOCOL_MISSING_REMSET,
44 SGEN_PROTOCOL_ALLOC_PINNED,
45 SGEN_PROTOCOL_ALLOC_DEGRADED
50 } SGenProtocolCollection;
80 gpointer value_vtable;
81 } SGenProtocolWBarrier;
86 gpointer value_vtable;
87 } SGenProtocolGlobalRemset;
95 } SGenProtocolPtrUpdate;
101 } SGenProtocolCleanup;
110 } SGenProtocolThreadRestart;
114 } SGenProtocolThreadRegister;
118 } SGenProtocolThreadUnregister;
125 gpointer value_vtable;
127 } SGenProtocolMissingRemset;
129 /* missing: finalizers, dislinks, roots, non-store wbarriers */
131 void binary_protocol_init (const char *filename) MONO_INTERNAL;
132 gboolean binary_protocol_is_enabled (void) MONO_INTERNAL;
134 void binary_protocol_flush_buffers (gboolean force) MONO_INTERNAL;
136 void binary_protocol_collection (int generation) MONO_INTERNAL;
137 void binary_protocol_alloc (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
138 void binary_protocol_alloc_pinned (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
139 void binary_protocol_alloc_degraded (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
140 void binary_protocol_copy (gpointer from, gpointer to, gpointer vtable, int size) MONO_INTERNAL;
141 void binary_protocol_pin (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
142 void binary_protocol_mark (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
143 void binary_protocol_wbarrier (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
144 void binary_protocol_global_remset (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
145 void binary_protocol_ptr_update (gpointer ptr, gpointer old_value, gpointer new_value, gpointer vtable, int size) MONO_INTERNAL;
146 void binary_protocol_cleanup (gpointer ptr, gpointer vtable, int size) MONO_INTERNAL;
147 void binary_protocol_empty (gpointer start, int size) MONO_INTERNAL;
148 void binary_protocol_thread_restart (gpointer thread) MONO_INTERNAL;
149 void binary_protocol_thread_register (gpointer thread) MONO_INTERNAL;
150 void binary_protocol_thread_unregister (gpointer thread) MONO_INTERNAL;
151 void binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offset,
152 gpointer value, gpointer value_vtable, int value_pinned) MONO_INTERNAL;
156 #define binary_protocol_is_enabled() FALSE
158 #define binary_protocol_flush_buffers(force)
159 #define binary_protocol_collection(generation)
160 #define binary_protocol_alloc(obj, vtable, size)
161 #define binary_protocol_alloc_pinned(obj, vtable, size)
162 #define binary_protocol_alloc_degraded(obj, vtable, size)
163 #define binary_protocol_copy(from, to, vtable, size)
164 #define binary_protocol_pin(obj, vtable, size)
165 #define binary_protocol_mark(obj, vtable, size)
166 #define binary_protocol_wbarrier(ptr, value, value_vtable)
167 #define binary_protocol_global_remset(ptr, value, value_vtable)
168 #define binary_protocol_ptr_update(ptr, old_value, new_value, vtable, size)
169 #define binary_protocol_cleanup(ptr, vtable, size)
170 #define binary_protocol_empty(start, size)
171 #define binary_protocol_thread_restart(thread)
172 #define binary_protocol_thread_register(thread)
173 #define binary_protocol_thread_unregister(thread)
174 #define binary_protocol_missing_remset(obj, obj_vtable, offset, value, value_vtable, value_pinned)