blob: c6ce6490f844375a282b925574dae5d2ed24ef10 [file] [log] [blame]
Allan MacKinnon4359d522018-06-19 13:57:04 -07001/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can
5 * be found in the LICENSE file.
6 *
7 */
8
9#pragma once
10
11//
12//
13//
14
15#include "skc.h"
16#include "types.h"
17
18//
19//
20//
21
22typedef skc_ulong skc_epoch_t;
23
24//
25//
26//
27
Hal Canary14195342018-07-11 16:10:14 -040028void
Allan MacKinnon4359d522018-06-19 13:57:04 -070029skc_weakref_epoch_init(skc_epoch_t * const epoch);
30
Hal Canary14195342018-07-11 16:10:14 -040031void
Allan MacKinnon4359d522018-06-19 13:57:04 -070032skc_weakref_epoch_inc(skc_epoch_t * const epoch);
33
Hal Canary14195342018-07-11 16:10:14 -040034void
35skc_weakref_init(skc_weakref_t * const weakref,
Allan MacKinnon4359d522018-06-19 13:57:04 -070036 skc_epoch_t * const epoch,
37 skc_uint const index);
38
Hal Canary14195342018-07-11 16:10:14 -040039bool
Allan MacKinnon4359d522018-06-19 13:57:04 -070040skc_weakref_is_invalid(skc_weakref_t const * const weakref,
Hal Canary14195342018-07-11 16:10:14 -040041 skc_epoch_t const * const epoch);
Allan MacKinnon4359d522018-06-19 13:57:04 -070042
43skc_uint
44skc_weakref_index(skc_weakref_t const * const weakref);
45
46//
47//
48//
49
50