Implement MachineKey.Protect and MachineKey.Unprotect
[mono.git] / mono / metadata / sgen-pointer-queue.h
1 /*
2  * sgen-pointer-queue.h: A pointer queue that can be sorted.
3  *
4  * Copyright (C) 2014 Xamarin Inc
5  *
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;
9  *
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.
14  *
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.
18  */
19
20 #ifndef __MONO_SGEN_POINTER_QUEUE_H__
21 #define __MONO_SGEN_POINTER_QUEUE_H__
22
23 typedef struct {
24         void **data;
25         size_t size;
26         size_t next_slot;
27 } SgenPointerQueue;
28
29 void sgen_pointer_queue_add (SgenPointerQueue *queue, void *ptr) MONO_INTERNAL;
30 void sgen_pointer_queue_clear (SgenPointerQueue *queue) MONO_INTERNAL;
31 void sgen_pointer_queue_remove_nulls (SgenPointerQueue *queue) MONO_INTERNAL;
32 void sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue) MONO_INTERNAL;
33 size_t sgen_pointer_queue_search (SgenPointerQueue *queue, void *addr) MONO_INTERNAL;
34 size_t sgen_pointer_queue_find (SgenPointerQueue *queue, void *ptr) MONO_INTERNAL;
35
36 #endif