aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compute/skc/weakref.h
blob: c6ce6490f844375a282b925574dae5d2ed24ef10 (plain)
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
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can
 * be found in the LICENSE file.
 *
 */

#pragma once

//
//
//

#include "skc.h"
#include "types.h"

//
//
//

typedef skc_ulong skc_epoch_t;

//
//
//

void
skc_weakref_epoch_init(skc_epoch_t * const epoch);

void
skc_weakref_epoch_inc(skc_epoch_t * const epoch);

void
skc_weakref_init(skc_weakref_t * const weakref,
                 skc_epoch_t   * const epoch,
                 skc_uint        const index);

bool
skc_weakref_is_invalid(skc_weakref_t const * const weakref,
                       skc_epoch_t   const * const epoch);

skc_uint
skc_weakref_index(skc_weakref_t const * const weakref);

//
//
//