25
26 #ifndef _SYS_UNIQUE_H
27 #define _SYS_UNIQUE_H
28
29 #pragma ident "%Z%%M% %I% %E% SMI"
30
31 #include <sys/zfs_context.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /* The number of significant bits in each unique value. */
38 #define UNIQUE_BITS 56
39
40 void unique_init(void);
41 void unique_fini(void);
42
43 /*
44 * Return a new unique value (which will not be uniquified against until
45 * it is unique_insert()-ed.
46 */
47 uint64_t unique_create(void);
48
49 /* Return a unique value, which equals the one passed in if possible. */
50 uint64_t unique_insert(uint64_t value);
51
52 /* Indicate that this value no longer needs to be uniquified against. */
53 void unique_remove(uint64_t value);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* _SYS_UNIQUE_H */
|
25
26 #ifndef _SYS_UNIQUE_H
27 #define _SYS_UNIQUE_H
28
29 #pragma ident "%Z%%M% %I% %E% SMI"
30
31 #include <sys/zfs_context.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /* The number of significant bits in each unique value. */
38 #define UNIQUE_BITS 56
39
40 void unique_init(void);
41 void unique_fini(void);
42
43 /*
44 * Return a new unique value (which will not be uniquified against until
45 * it is unique_insert()-ed).
46 */
47 uint64_t unique_create(void);
48
49 /* Return a unique value, which equals the one passed in if possible. */
50 uint64_t unique_insert(uint64_t value);
51
52 /* Indicate that this value no longer needs to be uniquified against. */
53 void unique_remove(uint64_t value);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* _SYS_UNIQUE_H */
|