-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathintset.h
40 lines (37 loc) · 1.62 KB
/
intset.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* File:
* intset.h
* Author(s):
* Vincent Gramoli <[email protected]>
* Description:
* Skip list integer set operations
*
* Copyright (c) 2009-2010.
*
* intset.h is part of Synchrobench
*
* Synchrobench is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, version 2
* of the License.
*
* This program 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 General Public License for more details.
*/
#include "fraser.h"
#include "linden.h"
int sl_contains(sl_intset_t *set, slkey_t key, int transactional);
int sl_contains_val(sl_intset_t *set, slkey_t key, val_t *val, int transactional);
int sl_add(sl_intset_t *set, slkey_t key, int transactional);
int sl_add_val(sl_intset_t *set, slkey_t key, val_t val, int transactional);
int sl_remove(sl_intset_t *set, slkey_t key, int transactional);
int sl_remove_val(sl_intset_t *set, slkey_t key, val_t *val, int transactional);
int sl_remove_succ(sl_intset_t *set, slkey_t key, int transactional);
int sl_remove_succ_val(sl_intset_t *set, slkey_t key, val_t *val, int transactional);
// priority queue
int lotan_shavit_delete_min_key(sl_intset_t *set, slkey_t *key, val_t *val, thread_data_t *d);
int lotan_shavit_delete_min(sl_intset_t *set, val_t *val, thread_data_t *d);
int spray_delete_min_key(sl_intset_t *set, slkey_t *key, val_t *val, thread_data_t *d);
int spray_delete_min(sl_intset_t *set, val_t *val, thread_data_t *d);