Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 1 | /* |
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 | |||||
22 | typedef skc_ulong skc_epoch_t; | ||||
23 | |||||
24 | // | ||||
25 | // | ||||
26 | // | ||||
27 | |||||
Hal Canary | 1419534 | 2018-07-11 16:10:14 -0400 | [diff] [blame^] | 28 | void |
Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 29 | skc_weakref_epoch_init(skc_epoch_t * const epoch); |
30 | |||||
Hal Canary | 1419534 | 2018-07-11 16:10:14 -0400 | [diff] [blame^] | 31 | void |
Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 32 | skc_weakref_epoch_inc(skc_epoch_t * const epoch); |
33 | |||||
Hal Canary | 1419534 | 2018-07-11 16:10:14 -0400 | [diff] [blame^] | 34 | void |
35 | skc_weakref_init(skc_weakref_t * const weakref, | ||||
Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 36 | skc_epoch_t * const epoch, |
37 | skc_uint const index); | ||||
38 | |||||
Hal Canary | 1419534 | 2018-07-11 16:10:14 -0400 | [diff] [blame^] | 39 | bool |
Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 40 | skc_weakref_is_invalid(skc_weakref_t const * const weakref, |
Hal Canary | 1419534 | 2018-07-11 16:10:14 -0400 | [diff] [blame^] | 41 | skc_epoch_t const * const epoch); |
Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 42 | |
43 | skc_uint | ||||
44 | skc_weakref_index(skc_weakref_t const * const weakref); | ||||
45 | |||||
46 | // | ||||
47 | // | ||||
48 | // | ||||
49 | |||||
50 |