[utils] Explicitly check if the system has mincore instead of relying on mmap been...
[mono-project.git] / mono / metadata / sgen-pointer-queue.h
blob0bbeedfdd67f21a71d20a2f7c1335b50481f5421
1 /*
2 * sgen-pointer-queue.h: A pointer queue that can be sorted.
4 * Copyright (C) 2014 Xamarin Inc
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License 2.0 as published by the Free Software Foundation;
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License 2.0 along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __MONO_SGEN_POINTER_QUEUE_H__
21 #define __MONO_SGEN_POINTER_QUEUE_H__
23 #include <glib.h>
25 typedef struct {
26 void **data;
27 size_t size;
28 size_t next_slot;
29 int mem_type;
30 } SgenPointerQueue;
32 void sgen_pointer_queue_add (SgenPointerQueue *queue, void *ptr) MONO_INTERNAL;
33 void sgen_pointer_queue_clear (SgenPointerQueue *queue) MONO_INTERNAL;
34 void sgen_pointer_queue_remove_nulls (SgenPointerQueue *queue) MONO_INTERNAL;
35 void sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue) MONO_INTERNAL;
36 size_t sgen_pointer_queue_search (SgenPointerQueue *queue, void *addr) MONO_INTERNAL;
37 size_t sgen_pointer_queue_find (SgenPointerQueue *queue, void *ptr) MONO_INTERNAL;
38 void sgen_pointer_queue_init (SgenPointerQueue *queue, int mem_type) MONO_INTERNAL;
39 void* sgen_pointer_queue_pop (SgenPointerQueue *queue) MONO_INTERNAL;
40 gboolean sgen_pointer_queue_is_empty (SgenPointerQueue *queue) MONO_INTERNAL;
41 void sgen_pointer_queue_free (SgenPointerQueue *queue) MONO_INTERNAL;
43 #endif