Asterisk - The Open Source Telephony Project
18.5.0
|
Go to the source code of this file.
Data Structures | |
struct | _bufhead |
struct | hashhdr |
struct | htab |
Macros | |
#define | ALL_CLEAR 0 |
#define | ALL_SET ((u_int32_t)0xFFFFFFFF) |
#define | BITMAPS hdr.bitmaps |
#define | BITS_PER_MAP 32 |
#define | BSHIFT hdr.bshift |
#define | BSIZE hdr.bsize |
#define | BUCKET_TO_PAGE(B) (B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__hash_log2((B)+1)-1] : 0) |
#define | BUF_BUCKET 0x0004 |
#define | BUF_DISK 0x0002 |
#define | BUF_MOD 0x0001 |
#define | BUF_PIN 0x0008 |
#define | BYTE_SHIFT 3 |
#define | CHARKEY "%$sniglet^&" |
#define | CLRBIT(A, N) ((A)[(N)/BITS_PER_MAP] &= ~(1<<((N)%BITS_PER_MAP))) |
#define | DEF_BUCKET_SHIFT 12 /* log2(BUCKET) */ |
#define | DEF_BUCKET_SIZE 4096 |
#define | DEF_BUFSIZE 65536 /* 64 K */ |
#define | DEF_DIRSIZE 256 |
#define | DEF_FFACTOR 65536 |
#define | DEF_SEGSIZE 256 |
#define | DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */ |
#define | DODISK(X) ((X) = (char *)((ptrdiff_t)(X)|0x2)) |
#define | DOMOD(X) ((X) = (char *)((ptrdiff_t)(X)|0x1)) |
#define | DSIZE hdr.dsize |
#define | FFACTOR hdr.ffactor |
#define | FULL_KEY 2 |
#define | FULL_KEY_DATA 3 |
#define | H_CHARKEY hdr.h_charkey |
#define | HDRPAGES hdr.hdrpages |
#define | HIGH_MASK hdr.high_mask |
#define | INT_BYTE_SHIFT 5 |
#define | INT_TO_BYTE 2 |
#define | IS_BUCKET(X) ((X) & BUF_BUCKET) |
#define | ISDISK(X) ((u_int32_t)(ptrdiff_t)(X)&0x2) |
#define | ISMOD(X) ((u_int32_t)(ptrdiff_t)(X)&0x1) |
#define | ISSET(A, N) ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP))) |
#define | LAST_FREED hdr.last_freed |
#define | LORDER hdr.lorder |
#define | LOW_MASK hdr.low_mask |
#define | MAGIC hdr.magic |
#define | MAX_BSIZE 65536 /* 2^16 */ |
#define | MAX_BUCKET hdr.max_bucket |
#define | MIN_BUFFERS 6 |
#define | MIN_FFACTOR 4 |
#define | MINHDRSIZE 512 |
#define | NCACHED |
#define | NEXT_FREE hdr.next_free |
#define | NKEYS hdr.nkeys |
#define | NUMKEY 1038583 |
#define | OADDR_OF(S, O) ((u_int32_t)((u_int32_t)(S) << SPLITSHIFT) + (O)) |
#define | OADDR_TO_PAGE(B) BUCKET_TO_PAGE ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B)); |
#define | OPAGENUM(N) ((N) & SPLITMASK) |
#define | OVFL_POINT hdr.ovfl_point |
#define | OVFLPAGE 0 |
#define | PARTIAL_KEY 1 |
#define | PTROF(X) ((BUFHEAD *)((ptrdiff_t)(X)&~0x3)) |
#define | REAL_KEY 4 |
#define | SETBIT(A, N) ((A)[(N)/BITS_PER_MAP] |= (1<<((N)%BITS_PER_MAP))) |
#define | SGSIZE hdr.ssize |
#define | SPARES hdr.spares |
#define | SPLITMASK 0x7FF |
#define | SPLITNUM(N) (((u_int32_t)(N)) >> SPLITSHIFT) |
#define | SPLITSHIFT 11 |
#define | SPLTMAX 8 |
#define | SSHIFT hdr.sshift |
#define | VERSION hdr.version |
Typedefs | |
typedef struct _bufhead | BUFHEAD |
typedef struct hashhdr | HASHHDR |
typedef struct htab | HTAB |
typedef BUFHEAD ** | SEGMENT |
Enumerations | |
enum | ACTION { HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT, FIND, ENTER } |
#define ALL_SET ((u_int32_t)0xFFFFFFFF) |
Definition at line 141 of file hash.h.
Referenced by __ibitmap(), and overflow_page().
#define BITS_PER_MAP 32 |
Definition at line 150 of file hash.h.
Referenced by first_free(), and overflow_page().
#define BUCKET_TO_PAGE | ( | B | ) | (B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__hash_log2((B)+1)-1] : 0) |
Definition at line 172 of file hash.h.
Referenced by __get_page(), and __put_page().
#define BUF_DISK 0x0002 |
Definition at line 55 of file hash.h.
Referenced by __get_buf(), and newbuf().
#define BUF_MOD 0x0001 |
Definition at line 54 of file hash.h.
Referenced by __add_ovflpage(), __addel(), __big_delete(), __big_insert(), __big_split(), __buf_free(), __delpair(), __split_page(), newbuf(), and ugly_split().
#define BUF_PIN 0x0008 |
Definition at line 57 of file hash.h.
Referenced by __split_page(), hash_access(), and newbuf().
#define BYTE_SHIFT 3 |
Definition at line 138 of file hash.h.
Referenced by __free_ovflpage(), __hash_open(), and overflow_page().
#define CHARKEY "%$sniglet^&" |
Definition at line 136 of file hash.h.
Referenced by __hash_open(), and flush_meta().
#define CLRBIT | ( | A, | |
N | |||
) | ((A)[(N)/BITS_PER_MAP] &= ~(1<<((N)%BITS_PER_MAP))) |
Definition at line 153 of file hash.h.
Referenced by __free_ovflpage().
#define DEF_BUCKET_SHIFT 12 /* log2(BUCKET) */ |
Definition at line 129 of file hash.h.
Referenced by init_hash().
#define DEF_BUCKET_SIZE 4096 |
Definition at line 128 of file hash.h.
Referenced by init_hash().
#define DEF_BUFSIZE 65536 /* 64 K */ |
Definition at line 127 of file hash.h.
Referenced by __hash_open().
#define DEF_DIRSIZE 256 |
Definition at line 132 of file hash.h.
Referenced by init_hash().
#define DEF_FFACTOR 65536 |
Definition at line 133 of file hash.h.
Referenced by __add_ovflpage(), and init_hash().
#define DEF_SEGSIZE 256 |
Definition at line 130 of file hash.h.
Referenced by init_hash().
#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */ |
Definition at line 131 of file hash.h.
Referenced by init_hash().
#define FULL_KEY 2 |
Definition at line 269 of file hash.h.
Referenced by __big_delete(), __big_insert(), __big_return(), and collect_key().
#define FULL_KEY_DATA 3 |
Definition at line 270 of file hash.h.
Referenced by __addel(), __big_delete(), __big_insert(), __find_last_page(), collect_data(), and collect_key().
#define INT_BYTE_SHIFT 5 |
Definition at line 140 of file hash.h.
Referenced by __ibitmap().
#define INT_TO_BYTE 2 |
Definition at line 139 of file hash.h.
Referenced by __ibitmap().
#define IS_BUCKET | ( | X | ) | ((X) & BUF_BUCKET) |
Definition at line 60 of file hash.h.
Referenced by __buf_free(), and newbuf().
#define ISDISK | ( | X | ) | ((u_int32_t)(ptrdiff_t)(X)&0x2) |
Definition at line 147 of file hash.h.
Referenced by __get_buf(), and newbuf().
#define ISSET | ( | A, | |
N | |||
) | ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP))) |
#define LAST_FREED hdr.last_freed |
Definition at line 281 of file hash.h.
Referenced by __free_ovflpage().
#define MAX_BSIZE 65536 /* 2^16 */ |
Definition at line 124 of file hash.h.
Referenced by init_hash().
#define MIN_BUFFERS 6 |
Definition at line 125 of file hash.h.
Referenced by __buf_init().
#define MIN_FFACTOR 4 |
Definition at line 134 of file hash.h.
Referenced by __add_ovflpage().
#define MINHDRSIZE 512 |
Definition at line 126 of file hash.h.
Referenced by init_htab().
#define NCACHED |
Definition at line 85 of file hash.h.
Referenced by flush_meta(), hdestroy(), overflow_page(), swap_header(), and swap_header_copy().
#define OADDR_OF | ( | S, | |
O | |||
) | ((u_int32_t)((u_int32_t)(S) << SPLITSHIFT) + (O)) |
Definition at line 170 of file hash.h.
Referenced by init_htab(), and overflow_page().
#define OADDR_TO_PAGE | ( | B | ) | BUCKET_TO_PAGE ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B)); |
Definition at line 174 of file hash.h.
Referenced by __get_page(), and __put_page().
#define OVFLPAGE 0 |
Definition at line 267 of file hash.h.
Referenced by __add_ovflpage(), __addel(), __big_delete(), __big_split(), __delpair(), __find_last_page(), fetch_bitmap(), hash_access(), hash_seq(), squeeze_key(), and ugly_split().
#define PARTIAL_KEY 1 |
Definition at line 268 of file hash.h.
Referenced by __big_insert(), __big_return(), and __find_bigpair().
#define PTROF | ( | X | ) | ((BUFHEAD *)((ptrdiff_t)(X)&~0x3)) |
Definition at line 144 of file hash.h.
Referenced by __get_buf().
#define REAL_KEY 4 |
Definition at line 271 of file hash.h.
Referenced by __addel(), __delpair(), __split_page(), fetch_bitmap(), hash_access(), hash_seq(), and ugly_split().
#define SETBIT | ( | A, | |
N | |||
) | ((A)[(N)/BITS_PER_MAP] |= (1<<((N)%BITS_PER_MAP))) |
Definition at line 154 of file hash.h.
Referenced by __ibitmap(), and overflow_page().
#define SPLITMASK 0x7FF |
Definition at line 167 of file hash.h.
Referenced by __free_ovflpage(), and overflow_page().
#define SPLITNUM | ( | N | ) | (((u_int32_t)(N)) >> SPLITSHIFT) |
#define SPLITSHIFT 11 |
Definition at line 166 of file hash.h.
Referenced by __free_ovflpage().
#define VERSION hdr.version |