*
* Copyright (C) 2012 Xamarin Inc
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License 2.0 as published by the Free Software Foundation;
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License 2.0 along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#ifndef __MONO_SGEN_DESCRIPTOR_H__
#define __MONO_SGEN_DESCRIPTOR_H__
#include <mono/sgen/sgen-conf.h>
-
/*
* ######################################################################
* ######## GC descriptors
typedef void (*SgenUserMarkFunc) (GCObject **addr, void *gc_data);
typedef void (*SgenUserRootMarkFunc) (void *addr, SgenUserMarkFunc mark_func, void *gc_data);
-void* sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker);
+SgenDescriptor sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker);
-gsize* sgen_get_complex_descriptor (mword desc);
-void* sgen_get_complex_descriptor_bitmap (mword desc);
-SgenUserRootMarkFunc sgen_get_user_descriptor_func (mword desc);
+gsize* sgen_get_complex_descriptor (SgenDescriptor desc);
+void* sgen_get_complex_descriptor_bitmap (SgenDescriptor desc);
+SgenUserRootMarkFunc sgen_get_user_descriptor_func (SgenDescriptor desc);
void sgen_init_descriptors (void);
#ifdef HEAVY_STATISTICS
-void sgen_descriptor_count_scanned_object (mword desc);
-void sgen_descriptor_count_copied_object (mword desc);
+void sgen_descriptor_count_scanned_object (SgenDescriptor desc);
+void sgen_descriptor_count_copied_object (SgenDescriptor desc);
#endif
static inline gboolean
-sgen_gc_descr_has_references (mword desc)
+sgen_gc_descr_has_references (SgenDescriptor desc)
{
/* This covers SMALL_PTRFREE and COMPLEX_PTRFREE */
if ((desc & DESC_TYPE_PTRFREE_MASK) == DESC_TYPE_PTRFREE_BITS)
} while (0)
#endif
-#define OBJ_COMPLEX_FOREACH_PTR(vt,obj) do { \
+#define OBJ_COMPLEX_FOREACH_PTR(desc,obj) do { \
/* there are pointers */ \
void **_objptr = (void**)(obj); \
gsize *bitmap_data = sgen_get_complex_descriptor ((desc)); \