FreeBSD ZFS
The Zettabyte File System
Data Structures | Defines | Typedefs | Functions | Variables

unique.c File Reference

#include <sys/zfs_context.h>
#include <sys/avl.h>
#include <sys/unique.h>
Include dependency graph for unique.c:

Go to the source code of this file.

Data Structures

struct  unique

Defines

#define UNIQUE_MASK   ((1ULL << UNIQUE_BITS) - 1)

Typedefs

typedef struct unique unique_t

Functions

static int unique_compare (const void *a, const void *b)
void unique_init (void)
void unique_fini (void)
uint64_t unique_create (void)
 Return a new unique value (which will not be uniquified against until it is unique_insert()-ed).
uint64_t unique_insert (uint64_t value)
 Return a unique value, which equals the one passed in if possible.
void unique_remove (uint64_t value)
 Indicate that this value no longer needs to be uniquified against.

Variables

static avl_tree_t unique_avl
static kmutex_t unique_mtx

Define Documentation

#define UNIQUE_MASK   ((1ULL << UNIQUE_BITS) - 1)

Definition at line 40 of file unique.c.


Typedef Documentation

typedef struct unique unique_t

Function Documentation

static int unique_compare ( const void *  a,
const void *  b 
) [static]

Definition at line 43 of file unique.c.

uint64_t unique_create ( void  )

Return a new unique value (which will not be uniquified against until it is unique_insert()-ed).

Definition at line 71 of file unique.c.

void unique_fini ( void  )

Definition at line 64 of file unique.c.

void unique_init ( void  )

Definition at line 56 of file unique.c.

uint64_t unique_insert ( uint64_t  value)

Return a unique value, which equals the one passed in if possible.

Definition at line 79 of file unique.c.

void unique_remove ( uint64_t  value)

Indicate that this value no longer needs to be uniquified against.

Definition at line 103 of file unique.c.


Variable Documentation

avl_tree_t unique_avl [static]

Definition at line 32 of file unique.c.

kmutex_t unique_mtx [static]

Definition at line 33 of file unique.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines